diff options
Diffstat (limited to 'node_modules/fn-name/readme.md')
-rw-r--r-- | node_modules/fn-name/readme.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/node_modules/fn-name/readme.md b/node_modules/fn-name/readme.md new file mode 100644 index 000000000..6c51f88ef --- /dev/null +++ b/node_modules/fn-name/readme.md @@ -0,0 +1,26 @@ +# fn-name [](https://travis-ci.org/sindresorhus/fn-name) + +> Get the name of a named function + +There is a non-standard [name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/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. + + +## Install + +```sh +$ npm install --save fn-name +``` + + +## Usage + +```js +fnName(function foo() {}); +//=> foo +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) |