{"_id":"throttleit","_rev":"48-2e808c2849ea0feac58a3542c514d8f6","name":"throttleit","description":"Throttle a function to limit its execution rate","dist-tags":{"latest":"2.1.0"},"versions":{"0.0.1":{"name":"throttleit","version":"0.0.1","keywords":[],"license":"MIT","_id":"throttleit@0.0.1","maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"dist":{"shasum":"c0d90d48ce5d748fec082b489af0d82e3b1167d6","tarball":"https://registry.npmjs.org/throttleit/-/throttleit-0.0.1.tgz","integrity":"sha512-NBeNM9nfWvuPkdgV60hzwHAd0ADce2GPtq0KBlCxPmxMKUVnHEv2+xwCT79HtE+bW7TrAsVirlI50/B+VJNdnw==","signatures":[{"sig":"MEQCIGo6VMDVzxl+p8EhSvyawESG4jZCr5xcGgqOmsX2p2ITAiAhp2msGOSc1Rw9TT53QTVLzVQ+0jiH+07B79CVs7lOCw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"component":{"scripts":{"throttle/index.js":"index.js"}},"_npmVersion":"1.2.14","description":"Throttle a function","development":{},"directories":{},"dependencies":{}},"0.0.2":{"name":"throttleit","version":"0.0.2","keywords":[],"license":"MIT","_id":"throttleit@0.0.2","maintainers":[{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"tootallnate","email":"nathan@tootallnate.net"}],"dist":{"shasum":"cfedf88e60c00dd9697b61fdd2a8343a9b680eaf","tarball":"https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz","integrity":"sha512-HtlTFeyYs1elDM2txiIGsdXHaq8kffVaZH/QEBRbo95zQqzlsBx5ELKhkPOZVad9OK9oxzwx6UrQN8Vfh/+yag==","signatures":[{"sig":"MEYCIQDOb2N3m4EJmF1Qld0bNQWHSQ5Pj26MOc0pGexNnKiVqwIhAI9MFZ1h/k2Jbyl4BNkG3EeEN0EYY7h4xH9IRRVsQxR2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"component":{"scripts":{"throttle/index.js":"index.js"}},"repository":{"url":"git://github.com/component/throttle.git","type":"git"},"_npmVersion":"1.2.15","description":"Throttle a function","development":{},"directories":{},"dependencies":{}},"1.0.0":{"name":"throttleit","version":"1.0.0","keywords":[],"license":"MIT","_id":"throttleit@1.0.0","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"}],"homepage":"https://github.com/component/throttle","bugs":{"url":"https://github.com/component/throttle/issues"},"dist":{"shasum":"9e785836daf46743145a5984b6268d828528ac6c","tarball":"https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz","integrity":"sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==","signatures":[{"sig":"MEUCIQDPs5wQXhynuqlFVR8t6gFzaybkCkDhkW+shKwWosrdGgIgTmvdus4kygJHK+irT8/qvLOIDxwRfuEwFj5/SMRDdSE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_shasum":"9e785836daf46743145a5984b6268d828528ac6c","gitHead":"19f9fd95782d372f2d0be6d5c60d60f8176d7ef8","scripts":{"test":"mocha --reporter spec"},"_npmUser":{"name":"dominicbarnes","email":"dominic@dbarnes.info"},"component":{"scripts":{"throttle/index.js":"index.js"}},"repository":{"url":"git://github.com/component/throttle.git","type":"git"},"_npmVersion":"2.1.18","description":"Throttle a function","directories":{},"_nodeVersion":"1.0.2","devDependencies":{"mocha":"^1.18.0"}},"1.0.1":{"name":"throttleit","version":"1.0.1","keywords":[],"license":"MIT","_id":"throttleit@1.0.1","maintainers":[{"name":"coreh","email":"thecoreh@gmail.com"},{"name":"swatinem","email":"arpad.borsos@googlemail.com"},{"name":"timaschew","email":"timaschew@gmail.com"},{"name":"anthonyshort","email":"antshort@gmail.com"},{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},{"name":"cristiandouce","email":"cristiandouce@gmail.com"},{"name":"stagas","email":"gstagas@gmail.com"},{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"kelonye","email":"kelonyemitchel@gmail.com"},{"name":"amasad","email":"amjad.masad@gmail.com"},{"name":"trevorgerhardt","email":"trevorgerhardt@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"},{"name":"dominicbarnes","email":"dominic@segment.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"mattmueller","email":"mattmuelle@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"},{"name":"yields","email":"yields@icloud.com"},{"name":"stephenmathieson","email":"me@stephenmathieson.com"},{"name":"retrofox","email":"rdsuarez@gmail.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"calvinfo","email":"calvin@calv.info"},{"name":"defunctzombie","email":"shtylman@gmail.com"}],"homepage":"https://github.com/sindresorhus/throttleit#readme","bugs":{"url":"https://github.com/sindresorhus/throttleit/issues"},"dist":{"shasum":"304ec51631c3b770c65c6c6f76938b384000f4d5","tarball":"https://registry.npmjs.org/throttleit/-/throttleit-1.0.1.tgz","fileCount":8,"integrity":"sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ==","signatures":[{"sig":"MEUCID8y8wqi7eUWJJ8NwaTse/N+/pI1fEo4pQIFk9InXVXmAiEA071YBcAZJjbbEhc6szz/5MOe8SDUD4tgWjjJY8gVOMQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4623},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"afb7848a9b231e90fe3b44f7d18d59821452367f","scripts":{"test":"mocha --reporter spec"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"component":{"scripts":{"throttle/index.js":"index.js"}},"repository":{"url":"git://github.com/sindresorhus/throttleit.git","type":"git"},"_npmVersion":"9.2.0","description":"Throttle a function","directories":{},"_nodeVersion":"20.9.0","_hasShrinkwrap":false,"devDependencies":{"mocha":"^1.18.0"},"_npmOperationalInternal":{"tmp":"tmp/throttleit_1.0.1_1700217160688_0.5627558231401293","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"throttleit","version":"2.0.0","keywords":["throttle","rate","limit","limited","rate-limit","ratelimit","throttling","optimization","performance","function","execution","interval","batch"],"license":"MIT","_id":"throttleit@2.0.0","maintainers":[{"name":"coreh","email":"thecoreh@gmail.com"},{"name":"swatinem","email":"arpad.borsos@googlemail.com"},{"name":"timaschew","email":"timaschew@gmail.com"},{"name":"anthonyshort","email":"antshort@gmail.com"},{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},{"name":"cristiandouce","email":"cristiandouce@gmail.com"},{"name":"stagas","email":"gstagas@gmail.com"},{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"kelonye","email":"kelonyemitchel@gmail.com"},{"name":"amasad","email":"amjad.masad@gmail.com"},{"name":"trevorgerhardt","email":"trevorgerhardt@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"},{"name":"dominicbarnes","email":"dominic@segment.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"mattmueller","email":"mattmuelle@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"},{"name":"yields","email":"yields@icloud.com"},{"name":"stephenmathieson","email":"me@stephenmathieson.com"},{"name":"retrofox","email":"rdsuarez@gmail.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"calvinfo","email":"calvin@calv.info"},{"name":"defunctzombie","email":"shtylman@gmail.com"}],"homepage":"https://github.com/sindresorhus/throttleit#readme","bugs":{"url":"https://github.com/sindresorhus/throttleit/issues"},"xo":{"rules":{"unicorn/prefer-module":"off"}},"dist":{"shasum":"b118da15e6062ec1daf448166e9a0378807401b7","tarball":"https://registry.npmjs.org/throttleit/-/throttleit-2.0.0.tgz","fileCount":5,"integrity":"sha512-9VImOCJfOMzgBNJIa8ifGnJbAY3XGkl+mGV/+N69+L07QXrg6B6FqPI+2MCqdO5Ojega5BsA94zKHh2rHsQW9Q==","signatures":[{"sig":"MEYCIQD+nUYA8ZvSZ6PLSsYKq6fCluzjK1RnwQXA8JZGCSGkwQIhAIf3DNuHoLfIKQZmQc+JSgu4RrqvH8ZxopVAedD2TUB/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4920},"main":"./index.js","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"3b06de30521b81c7fe283df279b90d0e20a8dd42","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/throttleit.git","type":"git"},"_npmVersion":"9.2.0","description":"Throttle a function to limit its execution rate","directories":{},"sideEffects":false,"_nodeVersion":"20.9.0","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.56.0","ava":"^5.3.1"},"_npmOperationalInternal":{"tmp":"tmp/throttleit_2.0.0_1700221877293_0.2565643052159827","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"throttleit","version":"2.1.0","description":"Throttle a function to limit its execution rate","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/throttleit.git"},"funding":"https://github.com/sponsors/sindresorhus","exports":{"types":"./index.d.ts","default":"./index.js"},"main":"./index.js","types":"./index.d.ts","sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava"},"keywords":["throttle","rate","limit","limited","rate-limit","ratelimit","throttling","optimization","performance","function","execution","interval","batch"],"devDependencies":{"ava":"^5.3.1","xo":"^0.56.0"},"xo":{"rules":{"unicorn/prefer-module":"off"}},"_id":"throttleit@2.1.0","gitHead":"ed1d22c70a964ef0299d0400dbfd1fbedef56a59","bugs":{"url":"https://github.com/sindresorhus/throttleit/issues"},"homepage":"https://github.com/sindresorhus/throttleit#readme","_nodeVersion":"22.2.0","_npmVersion":"10.6.0","dist":{"integrity":"sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==","shasum":"a7e4aa0bf4845a5bd10daa39ea0c783f631a07b4","tarball":"https://registry.npmjs.org/throttleit/-/throttleit-2.1.0.tgz","fileCount":5,"unpackedSize":5133,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC3jHFLKmiqd6UUXwUtDBEBnND9HjYRoOpWCqGRAGPdtAiBJBXLM5B7h4cTx0mO9UEvo4Fsy2ZHgNRlN5/X1INkP3Q=="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/throttleit_2.1.0_1719010258168_0.8806595942049604"},"_hasShrinkwrap":false}},"time":{"created":"2013-03-26T21:23:59.415Z","modified":"2024-06-21T22:50:58.519Z","0.0.1":"2013-03-26T21:24:01.652Z","0.0.2":"2013-03-26T21:31:01.043Z","1.0.0":"2015-02-27T15:10:17.396Z","1.0.1":"2023-11-17T10:32:40.881Z","2.0.0":"2023-11-17T11:51:17.496Z","2.1.0":"2024-06-21T22:50:58.348Z"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/throttleit.git"},"keywords":["throttle","rate","limit","limited","rate-limit","ratelimit","throttling","optimization","performance","function","execution","interval","batch"],"license":"MIT","homepage":"https://github.com/sindresorhus/throttleit#readme","bugs":{"url":"https://github.com/sindresorhus/throttleit/issues"},"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","readmeFilename":"readme.md","users":{"ash":true,"zeke":true,"beisen":true,"roccomuso":true}}