{"name":"throttleit","description":"Throttle a function","version":"1.0.0","keywords":[],"repository":{"type":"git","url":"git://github.com/component/throttle.git"},"devDependencies":{"mocha":"^1.18.0"},"license":"MIT","component":{"scripts":{"throttle/index.js":"index.js"}},"scripts":{"test":"mocha --reporter spec"},"gitHead":"19f9fd95782d372f2d0be6d5c60d60f8176d7ef8","bugs":{"url":"https://github.com/component/throttle/issues"},"homepage":"https://github.com/component/throttle","_id":"throttleit@1.0.0","_shasum":"9e785836daf46743145a5984b6268d828528ac6c","_from":".","_npmVersion":"2.1.18","_nodeVersion":"1.0.2","_npmUser":{"name":"dominicbarnes","email":"dominic@dbarnes.info"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"tootallnate","email":"nathan@tootallnate.net"},{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"retrofox","email":"rdsuarez@gmail.com"},{"name":"coreh","email":"thecoreh@gmail.com"},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"kelonye","email":"kelonyemitchel@gmail.com"},{"name":"mattmueller","email":"mattmuelle@gmail.com"},{"name":"yields","email":"yields@icloud.com"},{"name":"anthonyshort","email":"antshort@gmail.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},{"name":"cristiandouce","email":"cristian@gravityonmars.com"},{"name":"swatinem","email":"arpad.borsos@googlemail.com"},{"name":"stagas","email":"gstagas@gmail.com"},{"name":"amasad","email":"amjad.masad@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"calvinfo","email":"calvin@calv.info"},{"name":"dominicbarnes","email":"dominic@dbarnes.info"},{"name":"stephenmathieson","email":"me@stephenmathieson.com"},{"name":"trevorgerhardt","email":"trevorgerhardt@gmail.com"},{"name":"timaschew","email":"timaschew@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"}],"dist":{"shasum":"9e785836daf46743145a5984b6268d828528ac6c","tarball":"http://registry-npm.ywwl.com/throttleit/download/throttleit-1.0.0.tgz","integrity":"sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPs5wQXhynuqlFVR8t6gFzaybkCkDhkW+shKwWosrdGgIgTmvdus4kygJHK+irT8/qvLOIDxwRfuEwFj5/SMRDdSE="}],"size":1978,"noattachment":false,"key":"/throttleit/-/throttleit-1.0.0.tgz"},"directories":{},"readme":"# throttleit\n\n> Throttle a function to limit its execution rate\n\n## Install\n\n```sh\nnpm install throttleit\n```\n\n## Usage\n\n```js\nimport throttle from 'throttleit';\n\n// Throttling a function that processes data.\nfunction processData(data) {\n\tconsole.log('Processing:', data);\n\n\t// Add data processing logic here.\n}\n\n// Throttle the `processData` function to be called at most once every 3 seconds.\nconst throttledProcessData = throttle(processData, 3000);\n\n// Simulate calling the function multiple times with different data.\nthrottledProcessData('Data 1');\nthrottledProcessData('Data 2');\nthrottledProcessData('Data 3');\n```\n\n## API\n\n### throttle(function, wait)\n\nCreates a throttled function that limits calls to the original function to at most once every `wait` milliseconds. It guarantees execution after the final invocation and maintains the last context (`this`) and arguments.\n\n#### function\n\nType: `function`\n\nThe function to be throttled.\n\n#### wait\n\nType: `number`\n\nThe number of milliseconds to throttle invocations to.\n\n## Related\n\n- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle async functions\n- [debounce](https://github.com/sindresorhus/debounce) - Delay function calls until a set time elapses after the last invocation\n","publish_time":1425049817396,"_cnpm_publish_time":1425049817396,"dist-tags":{"latest":"3.0.0"}}