{"_id":"util-arity","_rev":"9-e3e64306f91e0ab4114462a4ae34a224","name":"util-arity","description":"Set the length of a function.","dist-tags":{"latest":"1.1.0"},"versions":{"0.0.3":{"name":"util-arity","version":"0.0.3","description":"Set the length of a function.","main":"arity.js","scripts":{"test":"istanbul cover _mocha -- -R spec"},"repository":{"type":"git","url":"git://github.com/blakeembrey/arity.git"},"keywords":["arity","function","length","arguments","count"],"author":{"name":"Blake Embrey"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/arity/issues"},"homepage":"https://github.com/blakeembrey/arity","devDependencies":{"mocha":"~1.17.0","istanbul":"~0.2.4"},"gitHead":"34596ed20fee84294a7a823d4339dfde66f6fa09","_id":"util-arity@0.0.3","_shasum":"312fd8eda724939fae689e92c341c07ea3c16838","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"dist":{"shasum":"312fd8eda724939fae689e92c341c07ea3c16838","tarball":"https://registry.npmjs.org/util-arity/-/util-arity-0.0.3.tgz","integrity":"sha512-vWXQInPhdFyFqCwg675zVLMNixspE+MLIOcJu6ql6bJXAbRhGVTObfDYklh4pdILvPiN7rOBcCIKVISUpKdn5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDI6LDNIvzYaulbgcElBYQ1kBtz0jPDEfFBZ1Ec8JJMNQIgUGDAWxaUJp6v6fZkS4BbUXvzidYFYyXkGG1n65h8QZo="}]}},"1.0.0":{"name":"util-arity","version":"1.0.0","description":"Set the length of a function.","main":"arity.js","scripts":{"test":"istanbul cover _mocha -- -R spec"},"repository":{"type":"git","url":"git://github.com/blakeembrey/arity.git"},"keywords":["arity","function","length","arguments","count"],"author":{"name":"Blake Embrey"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/arity/issues"},"homepage":"https://github.com/blakeembrey/arity","devDependencies":{"mocha":"~1.17.0","istanbul":"~0.2.4"},"gitHead":"decd6c78a78ceec6412b141ae61e9f3b86e4bf74","_id":"util-arity@1.0.0","_shasum":"68e17e5f7a6a753edca6365fad7e3365291d326b","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"dist":{"shasum":"68e17e5f7a6a753edca6365fad7e3365291d326b","tarball":"https://registry.npmjs.org/util-arity/-/util-arity-1.0.0.tgz","integrity":"sha512-A4QzceJ3bb6vPDfVlQ3WLoNsuho0F574K5Oswea1nqwR1G/7i8unjPP+M4kusmM0ov5kB88uAxsQAOSZFOK5TQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYdri0yfrsm9btAsTgnjLF+s/HyJbKiBSlx+Md8Hbf5AiBD5I5ATVe5KFmywT3J7vb24GZKUuAdNqYSnn1OHGjqrQ=="}]}},"1.0.1":{"name":"util-arity","version":"1.0.1","description":"Set the length of a function.","main":"arity.js","typings":"arity.d.ts","files":["arity.d.ts","arity.js"],"scripts":{"test":"istanbul cover _mocha -- -R spec"},"repository":{"type":"git","url":"git://github.com/blakeembrey/arity.git"},"keywords":["arity","function","length","arguments","count"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/arity/issues"},"homepage":"https://github.com/blakeembrey/arity","devDependencies":{"mocha":"~1.17.0","istanbul":"~0.2.4"},"gitHead":"d16f29c59a939974f9268b805a5b7884e147120d","_id":"util-arity@1.0.1","_shasum":"328186fe34569c3844c1944d42e9f820ec86e04f","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"dist":{"shasum":"328186fe34569c3844c1944d42e9f820ec86e04f","tarball":"https://registry.npmjs.org/util-arity/-/util-arity-1.0.1.tgz","integrity":"sha512-XVnBz5JmZTvKrVMZ2P54t6mQmFeN7jmE1Maffl+LCx/0mbe7z+2JLozEhuIKSLaEzBGg07XGPdWcGyKL5YROGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID55mURjzXgAvc1ED7JRAmJTz8A0oWdU22bsH8bUyChDAiEA+vU3NVppM1wg2jYrZQ1Lw800P8uOCI6dTuN+fddY1cg="}]},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}]},"1.0.2":{"name":"util-arity","version":"1.0.2","description":"Set the length of a function.","main":"arity.js","typings":"arity.d.ts","files":["arity.d.ts","arity.js"],"scripts":{"test":"istanbul cover _mocha -- -R spec"},"repository":{"type":"git","url":"git://github.com/blakeembrey/arity.git"},"keywords":["arity","function","length","arguments","count"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/arity/issues"},"homepage":"https://github.com/blakeembrey/arity","devDependencies":{"mocha":"~1.17.0","istanbul":"~0.2.4"},"gitHead":"1b66798e0ab86375fcdda05f3159b5f29adb3212","_id":"util-arity@1.0.2","_shasum":"294ab6e35711a436ff4375fd380831390c0a0386","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"dist":{"shasum":"294ab6e35711a436ff4375fd380831390c0a0386","tarball":"https://registry.npmjs.org/util-arity/-/util-arity-1.0.2.tgz","integrity":"sha512-dOYJFn1Ysn8b++BN7HIapAoczBpx8KpjcsgpZyAowRIiTT+Cne9o0TUUPiloVu4HCkm2oWogyFuSw6zKY8L6wQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCk2lH7lsFDuSmLi954BXFaJN5MBsnxqMEo/1LFZ8uggIgSnf9rSOrY7ufyDcRmWW7Ht7gGP3El3tgfvKGQ0idXYM="}]},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}]},"1.1.0":{"name":"util-arity","version":"1.1.0","description":"Set the length of a function.","main":"arity.js","typings":"arity.d.ts","files":["arity.d.ts","arity.js"],"scripts":{"test":"istanbul cover _mocha -- -R spec"},"repository":{"type":"git","url":"git://github.com/blakeembrey/arity.git"},"keywords":["arity","function","length","arguments","count"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/blakeembrey/arity/issues"},"homepage":"https://github.com/blakeembrey/arity","devDependencies":{"mocha":"~3.2.0","istanbul":"~0.4.5"},"gitHead":"4f622e88697869ba4bb291fda5d0c3f3211d4cc2","_id":"util-arity@1.1.0","_shasum":"59d01af1fdb3fede0ac4e632b0ab5f6ce97c9330","_from":".","_npmVersion":"3.10.10","_nodeVersion":"7.3.0","_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"dist":{"shasum":"59d01af1fdb3fede0ac4e632b0ab5f6ce97c9330","tarball":"https://registry.npmjs.org/util-arity/-/util-arity-1.1.0.tgz","integrity":"sha512-kkyIsXKwemfSy8ZEoaIz06ApApnWsk5hQO0vLjZS6UkBiGiW++Jsyb8vSBoc0WKlffGoGs5yYy/j5pp8zckrFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSvG8tKle6/fpmZU7L3FsRtT/+H7+sfQ5O36KSbXKC9QIgZfhsbcqLT6WDIX9JNKjC/cQ/63BpoFmxnlfhf3mQztU="}]},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/util-arity-1.1.0.tgz_1485640491128_0.589009529678151"}}},"readme":"# Arity\n\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n\n> Set a functions arity (the argument count) by proxying function calls.\n\n**P.S.** If you need need to enforce arity and don't care about argument length or `this`, use [`nary`](https://github.com/blakeembrey/nary). It's magnitudes faster than using `.apply` to proxy arguments.\n\n## When would I use this?\n\nIt's unlikely you'll need to use this utility in everyday development. The reason I wrote it was for functional utilities and backward compatibility with user expectations. For example, many modules use function arity to decide how the function behaves (e.g. error middleware in `express`, callbacks in `mocha`).\n\n## Installation\n\n```\nnpm install util-arity --save\n```\n\n## Usage\n\n```javascript\nvar fn = function () {};\nvar arity = require('util-arity');\n\nvar oneArg = arity(1, fn);\nvar twoArgs = arity(2, fn);\nvar threeArgs = arity(3, fn);\n\noneArgs.length; //=> 1\ntwoArgs.length; //=> 2\nthreeArgs.length; //=> 3\n```\n\n## TypeScript\n\nThe typings for this project are available for node module resolution with TypeScript.\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/util-arity.svg?style=flat\n[npm-url]: https://npmjs.org/package/util-arity\n[downloads-image]: https://img.shields.io/npm/dm/util-arity.svg?style=flat\n[downloads-url]: https://npmjs.org/package/util-arity\n[travis-image]: https://img.shields.io/travis/blakeembrey/arity.svg?style=flat\n[travis-url]: https://travis-ci.org/blakeembrey/arity\n[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/arity.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/blakeembrey/arity?branch=master\n","maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"time":{"modified":"2022-06-28T07:10:06.132Z","created":"2014-08-17T17:45:56.176Z","0.0.3":"2014-08-17T17:45:56.176Z","1.0.0":"2014-08-17T18:09:50.492Z","1.0.1":"2015-12-30T14:54:25.932Z","1.0.2":"2015-12-30T14:59:06.713Z","1.1.0":"2017-01-28T21:54:51.362Z"},"homepage":"https://github.com/blakeembrey/arity","keywords":["arity","function","length","arguments","count"],"repository":{"type":"git","url":"git://github.com/blakeembrey/arity.git"},"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"bugs":{"url":"https://github.com/blakeembrey/arity/issues"},"license":"MIT","readmeFilename":"README.md"}