{"name":"function-arguments","version":"1.0.2","description":"Get arguments of a function, useful for and used in dependency injectors. Works for regular functions, generator functions and arrow functions.","repository":{"type":"git","url":"git+https://github.com/tunnckocore/function-arguments.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":{"arr-map":"^2.0.0"},"devDependencies":{"assertit":"^0.1.0","pre-commit":"*"},"files":["index.js"],"keywords":["args","arguments","arrow","arrow-function","arrows","dependency","deps","fn","func","function","function-arguments","generator","generators","get","inject","injectors","parameters","params","regular","useful"],"verb":{"run":true,"toc":false,"layout":"empty","tasks":["readme"],"related":{"list":["parse-function","get-fn-name","fn-name","flatten-arguments","handle-arguments","manage-arguments","fn-args"]},"lint":{"reflinks":true}},"gitHead":"dd8b8a6de21f1bf8e0bd9cc3d7b44a1b1db00da0","bugs":{"url":"https://github.com/tunnckocore/function-arguments/issues"},"homepage":"https://github.com/tunnckocore/function-arguments#readme","_id":"function-arguments@1.0.2","_shasum":"2e2db12c4e813f11a71832d4870f253b282e2980","_from":".","_npmVersion":"3.8.2","_nodeVersion":"5.8.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"dist":{"shasum":"2e2db12c4e813f11a71832d4870f253b282e2980","tarball":"http://registry-npm.ywwl.com/function-arguments/download/function-arguments-1.0.2.tgz","integrity":"sha512-/RkOuZWnuyWuglOq1/zc2e0/2LW7qbYAfMqDl7Kw4UeCa/Xnk3P+2an+v0vSvUilQ598xC47DpA68nv2hLhPBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAmr5ve4KEgpN2Pz0yTSG94frfo5107PVS1vyuF0seUSAiEA0U7N+k5nuGkIYVfm5h27eMcDYsWROyttbq18yjM0Bcw="}],"size":3788,"noattachment":false,"key":"/function-arguments/-/function-arguments-1.0.2.tgz"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/function-arguments-1.0.2.tgz_1458287214118_0.07662624935619533"},"directories":{},"readme":"# function-arguments [![npm version][npmv-img]][npmv-url] [![github release][github-release-img]][github-release-url] [![License][license-img]][license-url]\n\n> Get arguments of a function, useful for and used in dependency injectors. Works for regular functions, generator functions and arrow functions.\n\n[![code style][standard-img]][standard-url]\n[![linux build][travis-img]][travis-url]\n[![code coverage][coverage-img]][coverage-url]\n[![dependency status][david-img]][david-url]\n[![npm downloads][downloads-img]][downloads-url]\n[![paypal donate][paypalme-img]][paypalme-url]\n\n## Install\n> Install with [npm](https://www.npmjs.com/)\n\n```\n$ npm i function-arguments --save\n```\n\n_**Important:** for more advanced stuff please use [parse-function][], don't suggest features or complex bugs._\n\n## Usage\n> For more use-cases see the [tests](./test.js)\n\n```js\nconst functionArguments = require('function-arguments')\n```\n\n## API\n\n### [functionArguments](index.js#L33)\n> Get function arguments names.\n\n**Params**\n\n* `fn` **{Function}**: Function from which to get arguments names.\n* `returns` **{Array}**\n\n**Example**\n\n```js\nvar fnArgs = require('function-arguments')\n\nconsole.log(fnArgs(function (a, b, c) {})) // => [ 'a', 'b', 'c' ]\nconsole.log(fnArgs(function named (a , b, c) {})) // => [ 'a', 'b', 'c' ]\n\nconsole.log(fnArgs(a => {})) // => [ 'a' ]\nconsole.log(fnArgs((a, b) => {})) // => [ 'a', 'b' ]\n\nconsole.log(fnArgs(function * (a ,b, c) {})) // => [ 'a', 'b', 'c' ]\nconsole.log(fnArgs(function * named (a ,b, c) {})) // => [ 'a', 'b', 'c' ]\n```\n\n### Works when using comments\n> As it works for ES2015, it also works if you use comments in weird places.\n\n```js\nconsole.log(fnArgs(function /* something may */ (\n  // go,\n  go,\n  /* wrong, */\n  here\n  // (when, using, comments) {}\n) { return 1 })) // => [ 'go', 'here' ]\n```\n\n## Related\n- [flatten-arguments](https://www.npmjs.com/package/flatten-arguments): Fastest, simplest and smallest. Pass `arguments` object or list of… [more](https://github.com/tunnckocore/flatten-arguments#readme) | [homepage](https://github.com/tunnckocore/flatten-arguments#readme \"Fastest, simplest and smallest. Pass `arguments` object or list of arguments and get flattened array.\")\n- [fn-args](https://www.npmjs.com/package/fn-args): Get the arguments of a function | [homepage](https://github.com/sindresorhus/fn-args \"Get the arguments of a function\")\n- [fn-name](https://www.npmjs.com/package/fn-name): Get the name of a named function | [homepage](https://github.com/sindresorhus/fn-name \"Get the name of a named function\")\n- [get-fn-name](https://www.npmjs.com/package/get-fn-name): Get function name with strictness and correctness in mind. Also… [more](https://github.com/tunnckocore/get-fn-name#readme) | [homepage](https://github.com/tunnckocore/get-fn-name#readme \"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- [handle-arguments](https://www.npmjs.com/package/handle-arguments): Get separately non-callback arguments in `.arguments` and the last argument… [more](https://github.com/hybridables/handle-arguments#readme) | [homepage](https://github.com/hybridables/handle-arguments#readme \"Get separately non-callback arguments in `.arguments` and the last argument if it [is-callback-function][] in `.callback`. It also works like [sliced][], but returns object with `.arguments` and `.callback` properties.\")\n- [manage-arguments](https://www.npmjs.com/package/manage-arguments): Prevents arguments leakage - managing arguments. From Optimization killers by… [more](https://github.com/tunnckocore/manage-arguments#readme) | [homepage](https://github.com/tunnckocore/manage-arguments#readme \"Prevents arguments leakage - managing arguments. From Optimization killers by Petka Antonov.\")\n- [parse-function](https://www.npmjs.com/package/parse-function): Parse a function, arrow function or string to object with… [more](https://github.com/tunnckocore/parse-function#readme) | [homepage](https://github.com/tunnckocore/parse-function#readme \"Parse a function, arrow function or string to object with name, args, params and body properties.\")\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/function-arguments/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[is-callback-function]: https://github.com/tunnckocore/is-callback-function\n[sliced]: https://github.com/aheckmann/sliced\n\n[downloads-url]: https://www.npmjs.com/package/function-arguments\n[downloads-img]: https://img.shields.io/npm/dm/function-arguments.svg\n\n[travis-url]: https://travis-ci.org/tunnckoCore/function-arguments\n[travis-img]: https://img.shields.io/travis/tunnckoCore/function-arguments/master.svg\n\n[coverage-url]: https://coveralls.io/r/tunnckoCore/function-arguments\n[coverage-img]: https://img.shields.io/coveralls/tunnckoCore/function-arguments.svg\n\n[david-url]: https://david-dm.org/tunnckoCore/function-arguments\n[david-img]: https://img.shields.io/david/tunnckoCore/function-arguments.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<!-- -->\n\n[paypalme-url]: https://ko-fi.com/tunnckoCore\n[paypalme-img]: https://img.shields.io/badge/support-donate-brightgreen.svg\n\n[npmv-url]: https://www.npmjs.com/package/function-arguments\n[npmv-img]: https://img.shields.io/npm/v/function-arguments.svg?label=npm%20version\n\n[github-release-url]: https://github.com/tunnckoCore/function-arguments/releases/latest\n[github-release-img]: https://img.shields.io/github/tag/tunnckoCore/function-arguments.svg?label=github%20tag\n\n[license-url]: https://github.com/tunnckoCore/function-arguments/blob/master/LICENSE\n[license-img]: https://img.shields.io/badge/license-MIT-blue.svg\n\n[parse-function]: https://tunnckocore.com/opensource","publish_time":1458287216291,"_cnpm_publish_time":1458287216291,"dist-tags":{"latest":"1.0.9"}}