diff options
Diffstat (limited to 'node_modules/fn-name')
| -rw-r--r-- | node_modules/fn-name/index.js | 8 | ||||
| -rw-r--r-- | node_modules/fn-name/license | 21 | ||||
| -rw-r--r-- | node_modules/fn-name/package.json | 30 | ||||
| -rw-r--r-- | node_modules/fn-name/readme.md | 26 |
4 files changed, 0 insertions, 85 deletions
diff --git a/node_modules/fn-name/index.js b/node_modules/fn-name/index.js deleted file mode 100644 index c8933518a..000000000 --- a/node_modules/fn-name/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -module.exports = function (fn) { - if (typeof fn !== 'function') { - throw new TypeError('Expected a function'); - } - - return fn.displayName || fn.name || (/function ([^\(]+)?\(/.exec(fn.toString()) || [])[1] || null; -}; diff --git a/node_modules/fn-name/license b/node_modules/fn-name/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/fn-name/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/fn-name/package.json b/node_modules/fn-name/package.json deleted file mode 100644 index b123584cb..000000000 --- a/node_modules/fn-name/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "fn-name", - "version": "2.0.1", - "description": "Get the name of a named function", - "repository": "sindresorhus/fn-name", - "keywords": [ - "function", - "func", - "fn", - "name" - ], - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "index.js" - ], - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "*" - }, - "engines": { - "node": ">=0.10.0" - } -} diff --git a/node_modules/fn-name/readme.md b/node_modules/fn-name/readme.md deleted file mode 100644 index 6c51f88ef..000000000 --- a/node_modules/fn-name/readme.md +++ /dev/null @@ -1,26 +0,0 @@ -# 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) |
