{"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":"http://registry-npm.ywwl.com/util-arity/download/util-arity-1.0.0.tgz","integrity":"sha512-A4QzceJ3bb6vPDfVlQ3WLoNsuho0F574K5Oswea1nqwR1G/7i8unjPP+M4kusmM0ov5kB88uAxsQAOSZFOK5TQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYdri0yfrsm9btAsTgnjLF+s/HyJbKiBSlx+Md8Hbf5AiBD5I5ATVe5KFmywT3J7vb24GZKUuAdNqYSnn1OHGjqrQ=="}],"size":2473,"noattachment":false,"key":"/util-arity/-/util-arity-1.0.0.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":1408298990492,"_cnpm_publish_time":1408298990492,"dist-tags":{"latest":"1.1.0"}}