{"_id":"@canonical/util-throttle","_rev":"27-2c4f2ce347bbc5d0357a9b63a083aba5","name":"@canonical/util-throttle","dist-tags":{"latest":"0.0.0-experimental.2"},"versions":{"0.0.0-experimental.0":{"name":"@canonical/util-throttle","version":"0.0.0-experimental.0","author":{"name":"Canonical Webteam","email":"webteam@canonical.com"},"license":"LGPL-3.0","_id":"@canonical/util-throttle@0.0.0-experimental.0","maintainers":[{"name":"jmuzina","email":"jmuzina@pm.me"},{"name":"lukewh","email":"luke@lukewh.com"},{"name":"mtruj","email":"mariapaula.trujillo@canonical.com"},{"name":"edlerd","email":"david.edler@canonical.com"},{"name":"seulkee","email":"seulkeekang@gmail.com"},{"name":"canonical-organization","email":"is-admin@canonical.com"},{"name":"petesfrench","email":"peterfrench94@gmail.com"},{"name":"frankban","email":"frankban@gmail.com"},{"name":"huwshimi","email":"huwshimi@gmail.com"},{"name":"anthonydillon","email":"me@anthonydillon.com"},{"name":"steverydz","email":"steverydz@gmail.com"},{"name":"amylily1011","email":"amy.lily@canonical.com"},{"name":"bartaz","email":"bartek.szopka@canonical.com"},{"name":"jpmartinspt","email":"joao.figueiredo.martins@canonical.com"}],"homepage":"https://github.com/canonical/ds25#readme","bugs":{"url":"https://github.com/canonical/ds25/issues"},"dist":{"shasum":"e01eec4fe62d18775b0bcb1f6e15a376b9acd056","tarball":"https://registry.npmjs.org/@canonical/util-throttle/-/util-throttle-0.0.0-experimental.0.tgz","fileCount":6,"integrity":"sha512-4XM7O9oEXSwAgc3qDOucqZmtDw4ogly3VNFUfVdAKnspQilBBt752LLSRIaXryMFyOx4MRERVue4gXrVY3rcFw==","signatures":[{"sig":"MEYCIQC1ZKyDq+ysHw+3qSBMFVtDMvHJrjzmtNZwYssTSz89zQIhANNzuTb/lKBFyMosKcHH43ffCQy9KWnbKuP7hMozfUR9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2910},"type":"module","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"2f929cd8ff62690b9ff3311a2675eb54e8369075","scripts":{"lint":"biome lint src/*.{ts,tsx}","build":"tsc","check":"bun run check:biome && bun run check:ts","format":"bun run format:biome","check:ts":"tsc --noEmit","check:fix":"bun run check:biome:fix","check:biome":"biome check src/* *.json","format:biome":"biome format src/*.{ts,tsx}","check:biome:fix":"biome check --write src/* *.json"},"_npmUser":{"name":"jmuzina","email":"jmuzina@pm.me"},"repository":{"url":"git+https://github.com/canonical/ds25.git","type":"git"},"_npmVersion":"10.5.0","description":"Throttling limits the number of times a function can be called over a specified  period. This is particularly useful for event listeners (such as scroll or resize),  which can trigger frequently and lead to performance issues.","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.3","@biomejs/biome":"^1.9.2","@canonical/biome-config":"^0.1.0-experimental.0","@canonical/typescript-config-base":"^0.1.0-experimental.0"},"_npmOperationalInternal":{"tmp":"tmp/util-throttle_0.0.0-experimental.0_1731620559773_0.6125010991909507","host":"s3://npm-registry-packages"}},"0.0.0-experimental.1":{"name":"@canonical/util-throttle","version":"0.0.0-experimental.1","author":{"name":"Canonical Webteam","email":"webteam@canonical.com"},"license":"LGPL-3.0","_id":"@canonical/util-throttle@0.0.0-experimental.1","maintainers":[{"name":"jmuzina","email":"jmuzina@pm.me"},{"name":"lukewh","email":"luke@lukewh.com"},{"name":"mtruj","email":"mariapaula.trujillo@canonical.com"},{"name":"edlerd","email":"david.edler@canonical.com"},{"name":"seulkee","email":"seulkeekang@gmail.com"},{"name":"canonical-organization","email":"is-admin@canonical.com"},{"name":"petesfrench","email":"peterfrench94@gmail.com"},{"name":"frankban","email":"frankban@gmail.com"},{"name":"huwshimi","email":"huwshimi@gmail.com"},{"name":"anthonydillon","email":"me@anthonydillon.com"},{"name":"steverydz","email":"steverydz@gmail.com"},{"name":"amylily1011","email":"amy.lily@canonical.com"},{"name":"bartaz","email":"bartek.szopka@canonical.com"},{"name":"jpmartinspt","email":"joao.figueiredo.martins@canonical.com"}],"homepage":"https://github.com/canonical/ds25#readme","bugs":{"url":"https://github.com/canonical/ds25/issues"},"dist":{"shasum":"14cccfac0a02f89f0a8865dc34e6b7eac92a77da","tarball":"https://registry.npmjs.org/@canonical/util-throttle/-/util-throttle-0.0.0-experimental.1.tgz","fileCount":6,"integrity":"sha512-SLRjRE2HNQyW3Y5QBR6tyWXQDIHWXvMqwGqvGuLX3Ump9WJjU3pKnkxw1yVJRwzdaWkCny7wTWEw0Me9TyiuLA==","signatures":[{"sig":"MEUCIQC9E+5OWf5DKapxyOOUoHA283VLg951NXJMXE3edwEZSgIgEA7msZRqBMz3V1P0byHAK0iuMi+fBvntWaphoo6rEvQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2975},"type":"module","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"2f929cd8ff62690b9ff3311a2675eb54e8369075","scripts":{"lint":"biome lint src/*.{ts,tsx}","build":"tsc","check":"bun run check:biome && bun run check:ts","format":"bun run format:biome","check:ts":"tsc --noEmit","check:fix":"bun run check:biome:fix","check:biome":"biome check src/* *.json","format:biome":"biome format src/*.{ts,tsx}","check:biome:fix":"biome check --write src/* *.json"},"_npmUser":{"name":"jmuzina","email":"jmuzina@pm.me"},"repository":{"url":"git+https://github.com/canonical/ds25.git","type":"git"},"_npmVersion":"10.5.0","description":"Canonical's standard throttle utility","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.3","@biomejs/biome":"^1.9.2","@canonical/biome-config":"^0.1.0-experimental.0","@canonical/typescript-config-base":"^0.1.0-experimental.0"},"_npmOperationalInternal":{"tmp":"tmp/util-throttle_0.0.0-experimental.1_1731620621004_0.718392897979639","host":"s3://npm-registry-packages"}},"0.0.0-experimental.2":{"name":"@canonical/util-throttle","version":"0.0.0-experimental.2","author":{"name":"Canonical Webteam","email":"webteam@canonical.com"},"license":"LGPL-3.0","_id":"@canonical/util-throttle@0.0.0-experimental.2","maintainers":[{"name":"jmuzina","email":"jmuzina@pm.me"},{"name":"lukewh","email":"luke@lukewh.com"},{"name":"mtruj","email":"mariapaula.trujillo@canonical.com"},{"name":"edlerd","email":"david.edler@canonical.com"},{"name":"seulkee","email":"seulkeekang@gmail.com"},{"name":"canonical-organization","email":"is-admin@canonical.com"},{"name":"petesfrench","email":"peterfrench94@gmail.com"},{"name":"frankban","email":"frankban@gmail.com"},{"name":"huwshimi","email":"huwshimi@gmail.com"},{"name":"anthonydillon","email":"me@anthonydillon.com"},{"name":"steverydz","email":"steverydz@gmail.com"},{"name":"amylily1011","email":"amy.lily@canonical.com"},{"name":"bartaz","email":"bartek.szopka@canonical.com"},{"name":"jpmartinspt","email":"joao.figueiredo.martins@canonical.com"}],"homepage":"https://github.com/canonical/ds25#readme","bugs":{"url":"https://github.com/canonical/ds25/issues"},"dist":{"shasum":"cf63a06cd1c6ffa05086d1d5c74c33ec444ea460","tarball":"https://registry.npmjs.org/@canonical/util-throttle/-/util-throttle-0.0.0-experimental.2.tgz","fileCount":6,"integrity":"sha512-3ugvs+XSB/vKwQETRox23MHfCvtxLnTzIUaXehnOOCrK6pb9akp63yCvq8JjBgOubU+dF8bRuromAR09Z6wUOw==","signatures":[{"sig":"MEUCIDfhggmPC1JYh8J6/IiMH4c8E94LpKgoMMDl82EpTCD8AiEAxY6/9Gz2pMWYAVm9HaEzufY4/7LH4Rm/6XT+ClFcX7w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3395},"type":"module","types":"dist/types/index.d.ts","module":"dist/esm/index.js","gitHead":"2f929cd8ff62690b9ff3311a2675eb54e8369075","scripts":{"lint":"biome lint src/*.{ts,tsx}","build":"tsc","check":"bun run check:biome && bun run check:ts","format":"bun run format:biome","check:ts":"tsc --noEmit","check:fix":"bun run check:biome:fix","check:biome":"biome check src/* *.json","format:biome":"biome format src/*.{ts,tsx}","check:biome:fix":"biome check --write src/* *.json"},"_npmUser":{"name":"jmuzina","email":"jmuzina@pm.me"},"repository":{"url":"git+https://github.com/canonical/ds25.git","type":"git"},"_npmVersion":"10.5.0","description":"Canonical's standard throttle utility","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.3","@biomejs/biome":"^1.9.2","@canonical/biome-config":"^0.1.0-experimental.0","@canonical/typescript-config-base":"^0.1.0-experimental.0"},"_npmOperationalInternal":{"tmp":"tmp/util-throttle_0.0.0-experimental.2_1731620885388_0.08694982840229804","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-11-14T21:42:39.663Z","modified":"2026-09-09T10:47:03.466Z","0.0.0-experimental.0":"2024-11-14T21:42:39.951Z","0.0.0-experimental.1":"2024-11-14T21:43:41.177Z","0.0.0-experimental.2":"2024-11-14T21:48:05.714Z"},"bugs":{"url":"https://github.com/canonical/ds25/issues"},"author":{"name":"Canonical Webteam","email":"webteam@canonical.com"},"license":"LGPL-3.0","homepage":"https://github.com/canonical/ds25#readme","repository":{"url":"git+https://github.com/canonical/ds25.git","type":"git"},"description":"Canonical's standard throttle utility","maintainers":[{"email":"ilayda.cavusoglupars@canonical.com","name":"ilayda21"},{"email":"frankban@gmail.com","name":"frankban"},{"email":"huw@ikmail.com","name":"huwshimi"},{"email":"me@anthonydillon.com","name":"anthonydillon"},{"email":"steverydz@gmail.com","name":"steverydz"},{"email":"bartek.szopka@canonical.com","name":"bartaz"},{"email":"joao.figueiredo.martins@canonical.com","name":"jpmartinspt"},{"email":"peterfrench94@gmail.com","name":"petesfrench"},{"email":"jmuzina@pm.me","name":"jmuzina"},{"email":"mariapaula.trujillo@canonical.com","name":"mtruj"},{"email":"david.edler@canonical.com","name":"edlerd"},{"email":"ardavan.behnia@canonical.com","name":"abehnia"},{"email":"is-admin@canonical.com","name":"canonical-organization"},{"email":"eduard.manta@canonical.com","name":"edisile-canonical"},{"email":"adam.steciuk@canonical.com","name":"steciuk-canonical"},{"email":"abbie.sims@canonical.com","name":"abbiesims"},{"email":"atakan99saglam@gmail.com","name":"ataku_b"},{"email":"adrian.villa.g@gmail.com","name":"ad.vl"},{"email":"its.muhammad.ali.mughal@gmail.com","name":"engr-ali"},{"email":"urvashi.sharma271099@gmail.com","name":"ninfa_jeon"},{"email":"n.devilliers1999@gmail.com","name":"ndv99"},{"email":"goulin.khoge@canonical.com","name":"goulin-canonical"},{"email":"21112002mj@gmail.com","name":"immortalcodes"},{"email":"alvaro.mateoalvarez@canonical.com","name":"alvaromateo"},{"email":"benjaminaderopo.oni@canonical.com","name":"onibenjo-canonical"}],"readme":"## Throttle Util\nThrottling limits the number of times a function can be called over a specified \nperiod. This is particularly useful for event listeners (such as scroll or resize), \nwhich can trigger frequently and lead to performance issues. \n\nBy using throttle, you can ensure that a function runs at most once in each \nspecified time interval, reducing application load and improving responsiveness.\n\n### Example\n\n```ts\nimport throttle from \"@canonical/util-throttle\";\n\nwindow.addEventListener(\n  'resize',\n  throttle(() => {\n    console.log(\"window was resized!\");\n  }, 10);\n);\n\n```\n","readmeFilename":"README.md"}