{"name":"throttleit","description":"Throttle a function","version":"0.0.1","keywords":[],"dependencies":{},"development":{},"license":"MIT","component":{"scripts":{"throttle/index.js":"index.js"}},"_id":"throttleit@0.0.1","dist":{"shasum":"c0d90d48ce5d748fec082b489af0d82e3b1167d6","tarball":"http://registry-npm.ywwl.com/throttleit/download/throttleit-0.0.1.tgz","integrity":"sha512-NBeNM9nfWvuPkdgV60hzwHAd0ADce2GPtq0KBlCxPmxMKUVnHEv2+xwCT79HtE+bW7TrAsVirlI50/B+VJNdnw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGo6VMDVzxl+p8EhSvyawESG4jZCr5xcGgqOmsX2p2ITAiAhp2msGOSc1Rw9TT53QTVLzVQ+0jiH+07B79CVs7lOCw=="}],"size":856,"noattachment":false,"key":"/throttleit/-/throttleit-0.0.1.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"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":1364333041652,"_cnpm_publish_time":1364333041652,"dist-tags":{"latest":"3.0.0"}}