{"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":"http://registry-npm.ywwl.com/util-arity/download/util-arity-0.0.3.tgz","integrity":"sha512-vWXQInPhdFyFqCwg675zVLMNixspE+MLIOcJu6ql6bJXAbRhGVTObfDYklh4pdILvPiN7rOBcCIKVISUpKdn5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDI6LDNIvzYaulbgcElBYQ1kBtz0jPDEfFBZ1Ec8JJMNQIgUGDAWxaUJp6v6fZkS4BbUXvzidYFYyXkGG1n65h8QZo="}],"size":2473,"noattachment":false,"key":"/util-arity/-/util-arity-0.0.3.tgz"},"directories":{},"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","publish_time":1408297556176,"_cnpm_publish_time":1408297556176,"dist-tags":{"latest":"1.1.0"}}