{"_id":"get-fn-name","_rev":"3374094","name":"get-fn-name","description":"Get function name with strictness and correctness in mind. Also works for arrow functions and getting correct name of bounded functions. Powered by [fn-name][].","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"time":{"modified":"2024-08-26T02:59:54.000Z","created":"2016-03-03T20:10:47.199Z","0.0.0":"2016-03-03T20:10:47.199Z","1.0.0":"2016-03-03T20:23:55.588Z"},"users":{},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"repository":{"type":"git","url":"git+https://github.com/tunnckocore/get-fn-name.git"},"versions":{"0.0.0":{"name":"get-fn-name","version":"0.0.0","description":"Get function name with strictness and correctness in mind. Also works for arrow functions and getting correct name of bounded functions. Powered by [fn-name][].","repository":{"type":"git","url":"git+https://github.com/tunnckocore/get-fn-name.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"precommit.silent":true,"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"fn-name":"^2.0.1"},"devDependencies":{"assertit":"^0.1.0","pre-commit":"*"},"files":["index.js"],"keywords":["fn","fn-name","fns","func","function","function-name","get","get-function-name","get-fn-name","name"],"verb":{"run":false,"toc":false,"layout":"empty","tasks":["readme"],"related":{"list":["get-installed-path","global-modules","global-prefix","parse-function","get-comments","bind-context","fn-name"]},"reflinks":["fn-name"],"lint":{"reflinks":true}},"gitHead":"61dc1183ed489e07cd519f7e26a61b4977bf599c","bugs":{"url":"https://github.com/tunnckocore/get-fn-name/issues"},"homepage":"https://github.com/tunnckocore/get-fn-name#readme","_id":"get-fn-name@0.0.0","_shasum":"3b420da32214c360d3e3cf92452d7c6d9a22138e","_from":".","_npmVersion":"3.7.5","_nodeVersion":"5.7.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"dist":{"shasum":"3b420da32214c360d3e3cf92452d7c6d9a22138e","size":3215,"noattachment":false,"key":"/get-fn-name/-/get-fn-name-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-fn-name/download/get-fn-name-0.0.0.tgz"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/get-fn-name-0.0.0.tgz_1457035843964_0.34684767620638013"},"directories":{},"publish_time":1457035847199,"_hasShrinkwrap":false,"_cnpm_publish_time":1457035847199,"_cnpmcore_publish_time":"2021-12-16T22:33:05.423Z"},"1.0.0":{"name":"get-fn-name","version":"1.0.0","description":"Get function name with strictness and correctness in mind. Also works for arrow functions and getting correct name of bounded functions. Powered by [fn-name][].","repository":{"type":"git","url":"git+https://github.com/tunnckocore/get-fn-name.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"precommit.silent":true,"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"fn-name":"^2.0.1"},"devDependencies":{"assertit":"^0.1.0","pre-commit":"*"},"files":["index.js"],"keywords":["fn","fn-name","fns","func","function","function-name","get","get-function-name","get-fn-name","name"],"verb":{"run":false,"toc":false,"layout":"empty","tasks":["readme"],"related":{"list":["get-installed-path","global-modules","global-prefix","parse-function","get-comments","bind-context","fn-name"]},"reflinks":["fn-name"],"lint":{"reflinks":true}},"gitHead":"42920a569e92031927f38168fee5b2f336bec859","bugs":{"url":"https://github.com/tunnckocore/get-fn-name/issues"},"homepage":"https://github.com/tunnckocore/get-fn-name#readme","_id":"get-fn-name@1.0.0","_shasum":"0aa8fadcf99598ebcb44cab0f1a7e95472c316c9","_from":".","_npmVersion":"3.7.5","_nodeVersion":"5.7.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"dist":{"shasum":"0aa8fadcf99598ebcb44cab0f1a7e95472c316c9","size":3306,"noattachment":false,"key":"/get-fn-name/-/get-fn-name-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-fn-name/download/get-fn-name-1.0.0.tgz"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/get-fn-name-1.0.0.tgz_1457036632529_0.05877808667719364"},"directories":{},"publish_time":1457036635588,"_hasShrinkwrap":false,"_cnpm_publish_time":1457036635588,"_cnpmcore_publish_time":"2021-12-16T22:33:05.212Z"}},"readme":"# [get-fn-name][author-www-url] [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url] \n\n> Get function name with strictness and correctness in mind. Also works for arrow functions and getting correct name of bounded functions. Powered by [fn-name][].\n\n[![code climate][codeclimate-img]][codeclimate-url] [![standard code style][standard-img]][standard-url] [![travis build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url] [![dependency status][david-img]][david-url]\n\n## Install\n```\nnpm i get-fn-name --save\n```\n\n## Usage\n> For more use-cases see the [tests](./test.js)\n\n```js\nconst getFnName = require('get-fn-name')\n```\n\n### [getFnName](index.js#L33)\n> Trying to get the name of `val` function.\n\n**Params**\n\n* `val` **{Function}**: Regular or arrow (es2015/es6, also know as `fat arrow`) function.    \n* `returns` **{String|null}**: The name of function or `null` otherwise.  \n\n**Example**\n\n```js\nvar name = require('get-fn-name')\n\nconsole.log(name(function () { return 1 })) // => null\nconsole.log(name(function named () { return 2 })) // => 'named'\n\n// arrows\nconsole.log(name(() => 3)) // => null\nconsole.log(name(() => { return 4 })) // => null\nconsole.log(name((a, b, c) => a + b + c)) // => null\nconsole.log(name((a, b) => { return a + b })) // => null\n```\n\n## Related\n* [bind-context](https://www.npmjs.com/package/bind-context): Bind context to a function and preserves her name. Can be… [more](https://www.npmjs.com/package/bind-context) | [homepage](https://github.com/tunnckocore/bind-context)\n* [fn-name](https://www.npmjs.com/package/fn-name): Get the name of a named function | [homepage](https://github.com/sindresorhus/fn-name)\n* [get-comments](https://www.npmjs.com/package/get-comments): Extract javascript comments on per character basis. Comment object compatible with… [more](https://www.npmjs.com/package/get-comments) | [homepage](https://github.com/tunnckocore/get-comments)\n* [get-installed-path](https://www.npmjs.com/package/get-installed-path): Get the installation path of the given package if it is… [more](https://www.npmjs.com/package/get-installed-path) | [homepage](https://github.com/tunnckoCore/get-installed-path)\n* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules)\n* [global-prefix](https://www.npmjs.com/package/global-prefix): Get the npm global path prefix. | [homepage](https://github.com/jonschlinkert/global-prefix)\n* [parse-function](https://www.npmjs.com/package/parse-function): Parse a function, arrow function or string to object with name,… [more](https://www.npmjs.com/package/parse-function) | [homepage](https://github.com/tunnckocore/parse-function)\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/get-fn-name/issues/new).  \nBut before doing anything, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) guidelines.\n\n## [Charlike Make Reagent](http://j.mp/1stW47C) [![new message to charlike][new-message-img]][new-message-url] [![freenode #charlike][freenode-img]][freenode-url]\n\n[![tunnckoCore.tk][author-www-img]][author-www-url] [![keybase tunnckoCore][keybase-img]][keybase-url] [![tunnckoCore npm][author-npm-img]][author-npm-url] [![tunnckoCore twitter][author-twitter-img]][author-twitter-url] [![tunnckoCore github][author-github-img]][author-github-url]\n\n[fn-name]: https://github.com/sindresorhus/fn-name\n\n[npmjs-url]: https://www.npmjs.com/package/get-fn-name\n[npmjs-img]: https://img.shields.io/npm/v/get-fn-name.svg?label=get-fn-name\n\n[license-url]: https://github.com/tunnckoCore/get-fn-name/blob/master/LICENSE\n[license-img]: https://img.shields.io/badge/license-MIT-blue.svg\n\n[codeclimate-url]: https://codeclimate.com/github/tunnckoCore/get-fn-name\n[codeclimate-img]: https://img.shields.io/codeclimate/github/tunnckoCore/get-fn-name.svg\n\n[travis-url]: https://travis-ci.org/tunnckoCore/get-fn-name\n[travis-img]: https://img.shields.io/travis/tunnckoCore/get-fn-name/master.svg\n\n[coveralls-url]: https://coveralls.io/r/tunnckoCore/get-fn-name\n[coveralls-img]: https://img.shields.io/coveralls/tunnckoCore/get-fn-name.svg\n\n[david-url]: https://david-dm.org/tunnckoCore/get-fn-name\n[david-img]: https://img.shields.io/david/tunnckoCore/get-fn-name.svg\n\n[standard-url]: https://github.com/feross/standard\n[standard-img]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n\n[author-www-url]: http://www.tunnckocore.tk\n[author-www-img]: https://img.shields.io/badge/www-tunnckocore.tk-fe7d37.svg\n\n[keybase-url]: https://keybase.io/tunnckocore\n[keybase-img]: https://img.shields.io/badge/keybase-tunnckocore-8a7967.svg\n\n[author-npm-url]: https://www.npmjs.com/~tunnckocore\n[author-npm-img]: https://img.shields.io/badge/npm-~tunnckocore-cb3837.svg\n\n[author-twitter-url]: https://twitter.com/tunnckoCore\n[author-twitter-img]: https://img.shields.io/badge/twitter-@tunnckoCore-55acee.svg\n\n[author-github-url]: https://github.com/tunnckoCore\n[author-github-img]: https://img.shields.io/badge/github-@tunnckoCore-4183c4.svg\n\n[freenode-url]: http://webchat.freenode.net/?channels=charlike\n[freenode-img]: https://img.shields.io/badge/freenode-%23charlike-5654a4.svg\n\n[new-message-url]: https://github.com/tunnckoCore/ama\n[new-message-img]: https://img.shields.io/badge/ask%20me-anything-green.svg\n\n","_attachments":{},"homepage":"https://github.com/tunnckocore/get-fn-name#readme","bugs":{"url":"https://github.com/tunnckocore/get-fn-name/issues"},"license":"MIT"}