time-to-botec/squiggle/node_modules/@stdlib/utils/function-name/docs/repl.txt

31 lines
514 B
Plaintext
Raw Normal View History

{{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
--------