time-to-botec/js/node_modules/@stdlib/utils/function-name/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

31 lines
514 B
Plaintext

{{alias}}( fcn )
Returns the name of a function.
If provided an anonymous function, the function returns an empty `string` or
the string `"anonymous"`.
Parameters
----------
fcn: Function
Input function.
Returns
-------
out: string
Function name.
Examples
--------
> var v = {{alias}}( String )
'String'
> v = {{alias}}( function foo(){} )
'foo'
> v = {{alias}}( function(){} )
'' || 'anonymous'
See Also
--------