UNPKG
@pnpm/ramda
Version:
latest (0.28.1)
0.28.1
A practical functional library for JavaScript programmers.
ramdajs.com
ramda/ramda
@pnpm/ramda
/
src
/
internal
/
_functionName.js
7 lines
(6 loc)
•
225 B
JavaScript
View Raw
1
2
3
4
5
6
7
function
_functionName
(f)
{ // String(x => x) evaluates to
"x => x"
, so the pattern may
not
match
. var
match
= String(f).
match
(/^
function
(\w*)
/);
return
match
== null ?
''
:
match
[
1
]; }
module
.exports = _functionName;