package.docs.repl.txt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of regexp-function-name Show documentation
Show all versions of regexp-function-name Show documentation
Return a regular expression to capture a function name.
The newest version!
{{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
--------