{"_id":"@adouming/throttleit","_rev":"1-7192f26d37db12c1e5207edb34d93d85","name":"@adouming/throttleit","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@adouming/throttleit","description":"Throttle a function","version":"1.0.0","keywords":[],"repository":{"type":"git","url":"git://github.com/component/throttle.git"},"main":"index.js","devDependencies":{"mocha":"^1.18.0"},"license":"MIT","component":{"scripts":{"throttle/index.js":"index.js"}},"scripts":{"test":"mocha --reporter spec"},"gitHead":"afb7848a9b231e90fe3b44f7d18d59821452367f","bugs":{"url":"https://github.com/component/throttle/issues"},"homepage":"https://github.com/component/throttle#readme","_id":"@adouming/throttleit@1.0.0","_nodeVersion":"16.13.2","_npmVersion":"8.3.2","dist":{"integrity":"sha512-7ZTi0wXR8OJbuYfptKsffD6LH0iADWYpwT6eFTxwqRbMaBWznEA3gp5WX1f4NsZG8A4qGbR0ocKfdfeB82nKCg==","shasum":"1a32dce8e240f993cbfb74e01bca66b6421ee8f6","tarball":"https://registry.npmjs.org/@adouming/throttleit/-/throttleit-1.0.0.tgz","fileCount":8,"unpackedSize":4826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBh2kCRA9TVsSAnZWagAA4I0P/i/+wKtxh5n1FxjDylLU\niPdebLjE+aS2SXKgw2u/8C1CYy3VcgP9R3B2kLG3W5Z46muNEq2D4AYAtIjQ\nFc96kkIgqCfiFmxVTUpCw+NdckU8uZsc2medSQPY3U/x/xuKCM601FTEuJmS\nUvtaQJWoR39JKJ3ly6CWaJ7JLsQnEF+LWCdnbsvmW2PxgOxVqOCi7HIlodKl\npl5+zsoBz10XUcWsU74H2u7T0S7+sk6zkl+DiNHoy9aqYlEQHcFaSkn4JHV9\nRgns93uILZUkIyunolHmTOHoz/iaeQpJOkKdDdEFjA4hGwZSeCjcu0DpAg9C\n9chQebOaEz7uh89RN3brqO6K5ClcQkWOtjGNlbwcEJ9ByrzDAJN5gCWNncp8\n4QdUIPwX9UoGBDIcAf0kJDNr//9a+BQABdZGD/e5Mh4Tfb2FaP3CmAIl6Qqk\nSX09Y7bCV8mfl0W4b10nh1SRqInrFcEjYCR381nl1sbZS+yBHNrXNJTKuT+J\n7uxb3z8bQRZGyoJ5nm6ak9PZCDSB/vt3Sa0WyBSlpL+C6eCKYG7bzbQeuzx6\nL3lCamKE1i8mQCg/34ClHT0yfP7GJgXpn8X+kAx/4YyLb4MH6b8XVtMIzNDP\nyBmrqoOmLUfdV1G6TksvnOkQgfLaSEs9tQKe+W4777McTP+9V1zlv2Y2lDL1\n+4PT\r\n=r1lK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGBkfFuXYSWTySxW6LMWjv/bGVdir95CmTookhCCwmxIAiA31cKQztax2i0npy5Iz4/pr5ph2bv5Th/9E8K4DDtT5A=="}]},"_npmUser":{"name":"adouming","email":"156530445@qq.com"},"directories":{},"maintainers":[{"name":"adouming","email":"156530445@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/throttleit_1.0.0_1644567972645_0.30438485531758586"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-11T08:26:12.574Z","1.0.0":"2022-02-11T08:26:12.783Z","modified":"2022-04-04T11:36:31.711Z"},"maintainers":[{"name":"adouming","email":"156530445@qq.com"}],"description":"Throttle a function","homepage":"https://github.com/component/throttle#readme","keywords":[],"repository":{"type":"git","url":"git://github.com/component/throttle.git"},"bugs":{"url":"https://github.com/component/throttle/issues"},"license":"MIT","readme":"\r\n# throttle\r\n\r\n  Throttle a function\r\n\r\n## Installation\r\n```sh\r\n$ component install component/throttle\r\n```\r\n\r\n```sh\r\n$ npm install throttleit\r\n```\r\n## Example\r\n\r\n```js\r\n// with component:\r\nvar throttle = require('throttle');\r\n// with npm: \r\n// var throttle = require('throttleit');\r\n\r\nwindow.onresize = throttle(resize, 200);\r\n\r\nfunction resize(e) {\r\n  console.log('height', window.innerHeight);\r\n  console.log('width', window.innerWidth);\r\n}\r\n```\r\n\r\n## API\r\n\r\n### throttle(fn, wait)\r\n\r\nCreates a function that will call `fn` at most once every `wait` milliseconds.\r\n\r\nSupports leading and trailing invocation.\r\n\r\n`fn` will receive last context (`this`) and last arguments passed to a throttled wrapper before `fn` was invoked.\r\n\r\n## License\r\n\r\n  MIT\r\n","readmeFilename":"Readme.md"}