source:
node_modules/ramda/src/internal/_functionName.js
Last change on this file was d24f17c, checked in by , 15 months ago | |
---|---|
|
|
File size: 225 bytes |
Rev | Line | |
---|---|---|
[d24f17c] | 1 | function _functionName(f) { |
2 | // String(x => x) evaluates to "x => x", so the pattern may not match. | |
3 | var match = String(f).match(/^function (\w*)/); | |
4 | return match == null ? '' : match[1]; | |
5 | } | |
6 | ||
7 | module.exports = _functionName; |
Note:
See TracBrowser
for help on using the repository browser.