UNPKG
@pnpm/ramda
Version:
latest (0.28.1)
0.28.1
A practical functional library for JavaScript programmers.
ramdajs.com
ramda/ramda
@pnpm/ramda
/
es
/
internal
/
_functionName.js
5 lines
•
207 B
JavaScript
View Raw
1
2
3
4
5
export
default
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
]; }