time-to-botec/squiggle/node_modules/@stdlib/regexp/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
594 B
Plaintext

{{alias}}()
Return a regular expression to capture a function name.
Returns
-------
re: RegExp
Regular expression.
Examples
--------
> var RE_FUNCTION_NAME = {{alias}}();
> function beep() { return 'boop'; };
> var name = RE_FUNCTION_NAME.exec( beep.toString() )[ 1 ]
'beep'
> name = RE_FUNCTION_NAME.exec( function () {} )[ 1 ]
''
{{alias}}.REGEXP
Regular expression to capture a function name.
Examples
--------
> var str = {{alias}}.REGEXP.exec( Math.sqrt.toString() )[ 1 ]
'sqrt'
See Also
--------