minor tweak...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-12-04 06:15:46 +03:00
parent 7b23e84dcc
commit 2f8250d75d
2 changed files with 6 additions and 8 deletions

View File

@ -394,9 +394,9 @@ module.UNDEFINED = ASIS(undefined)
// XXX is this correct?? // XXX is this correct??
// NOTE: by default an action will return 'this', i.e. the action set // NOTE: by default an action will return 'this', i.e. the action set
// object the action was called from. // object the action was called from.
// NOTE: if func.nmae is set to '<action-name>' it will be reset to the // NOTE: if func.nmae is set to '<action-name>' or it is '' (anonymous
// action name by Action(..). This is a means for extending functions // function) it will be reset to the action name by Action(..). This
// to get the specific action name. // is a means for extending functions to get the specific action name.
// Example: // Example:
// var getActionName = function(func){ // var getActionName = function(func){
// var f = function(...args){ // var f = function(...args){
@ -786,10 +786,8 @@ object.Constructor('Action', Function, {
meth.func = func meth.func = func
if(func.name == '<action-name>'){ ;(func.name == '' || func.name == '<action-name>')
Object.defineProperty(func, 'name', { && Object.defineProperty(func, 'name', { value: name })
value: name,
}) }
// make introspection be a bit better... // make introspection be a bit better...
meth.toString = function(){ meth.toString = function(){

View File

@ -1,6 +1,6 @@
{ {
"name": "ig-actions", "name": "ig-actions",
"version": "3.24.20", "version": "3.24.21",
"description": "", "description": "",
"main": "actions.js", "main": "actions.js",
"scripts": { "scripts": {