Repository URL to install this package:
|
Version:
1.0.0-1 ▾
|
vending-octopus-service-dep
/
usr
/
local
/
lib
/
vending
/
octopus
/
service
/
node_modules
/
fn-name
|
|---|
| .. |
| index.js |
| package.json |
| readme.md |
| license |
Get the name of a named function
There is a name property on functions, but it's not supported in all browsers. This module tries that property then falls back to extracting the name from the function source.
$ npm install fn-name
const fnName = require('fn-name'); fnName(function foo() {}); //=> 'foo'