{"_id":"dettle","_rev":"5-bd1d3d44d5427478c4e5f6b1264f6627","name":"dettle","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"dettle","version":"1.0.0","keywords":["tiny","debounce","throttle"],"_id":"dettle@1.0.0","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"homepage":"https://github.com/fabiospampinato/dettle#readme","bugs":{"url":"https://github.com/fabiospampinato/dettle/issues"},"dist":{"shasum":"ae1019d0dce71623f36494d50b6490028f2186f1","tarball":"https://registry.npmjs.org/dettle/-/dettle-1.0.0.tgz","fileCount":21,"integrity":"sha512-OcLLmFjrmIGU7Tjz5ZwFw74FtWiXi1WMOQzqcLhK1/rBxr0VveNQ4RjZon+3o2SVSPJEv0W2POLFCEjdbcbm0g==","signatures":[{"sig":"MEQCIAcBHFmvGqZzsoeXI6dr71Bpl3WW+/uPkb3ttFrZNSFRAiBeHHCvheDkvTSq27gpOP7Eld3TZWMjCAOZh8ME9Hareg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1Cs1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWNw//QvfSRHvuRAtCXoEy2R3158szA7DMsa4Gx81kKBvJWEescoCz\r\nvZs/WYRMzRND3wS3X1wLVu6SBhRPLrSjE5loYFpiAV8IlGpSGXY94YS3THN7\r\nzKBlDq8MPpWFIZAdXS5dIkSor1FvF3N392NvR7pTUW8hORTXKCuPp6DK7djE\r\ny/vygJ2z8SCjR3kPhSxlcGUHqSOyQwDqZAqYrAkQpIZEMevE5M2nFSt0/kLp\r\n38bdsg0X9a4lhF45iV0wC0Lnl8rPKJHjnPoKV/S4lFbJ2gx0WZnYbSTHD5CL\r\n7W0i8R0QQDZbywnT1vdGk3TyUoHLhb/TebOtcokU+Bc5XEQ9+Of1quldSWmG\r\nfgUeUN5R8Bevr57MJq+L4AAk0LCzi+pSRjmwUi/r7LWoS4YjeLGBfJ6Ye8Ba\r\nT2AId6Je9foFg74khjr6eigqZLN0GimH7mdLmvtJpjGgW3W/EMe6jTIU12z0\r\nr9zi73uPcJhlRyGa/5nd1SQZuK1gkM8Zs+8ZHVC9sY6492htO4wJXR9vew7D\r\nCDQQj5ykmetId9v7vn6wQIIo5DC9mG4ZfhwlzMxhV28xm9xNJVg0QyQoJ6cV\r\n3h/KT8vONjFCdJjufuDE88PEVbhieyvhZ0WHXrsFS6eL6DjuqU4cP5qXqJO2\r\nWoxB3SE+qdINQuxNzaJMdweJyDa2/nh4C/0=\r\n=Xdoy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"npm run clean && npm run compile && npm run test"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/dettle.git","type":"git"},"_npmVersion":"8.19.2","description":"A tiny fully-featured debounce and throttle implementation.","directories":{},"_nodeVersion":"18.12.0","_hasShrinkwrap":false,"devDependencies":{"fava":"^0.0.7","tsex":"^1.1.4","typescript":"^4.9.4"},"_npmOperationalInternal":{"tmp":"tmp/dettle_1.0.0_1674849077366_0.36311149847736934","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"dettle","version":"1.0.1","keywords":["tiny","debounce","throttle"],"_id":"dettle@1.0.1","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"homepage":"https://github.com/fabiospampinato/dettle#readme","bugs":{"url":"https://github.com/fabiospampinato/dettle/issues"},"dist":{"shasum":"25e07a725722e389d3dea28027fb4a53cf18d8dd","tarball":"https://registry.npmjs.org/dettle/-/dettle-1.0.1.tgz","fileCount":21,"integrity":"sha512-/oD3At60ZfhgzpofJtyClNTrIACyMdRe+ih0YiHzAniN0IZnLdLpEzgR6RtGs3kowxUkTnvV/4t1FBxXMUdusQ==","signatures":[{"sig":"MEUCIQCZGCOd4z8LU/guoO025jpAsS8nACX6+3BIJzzh2ym6igIgF1O8eliAeHbw68mPysinG/A335SVVAeGdIwNSAZsBns=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1F1MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpE7g//WonIvcoTS+4HD5YOXUNPqKnWDL1z9x6tOb0qMUtlAS0sfk69\r\ny4AHS3ujunuw6q9uivX9xpaWu2Ag4x4mIMIfld72jx9rAFPhD5kjnJqyPF1D\r\nyYqFNclG+N5HhVUHaScbti2QCqlVjjzLG7jd5F9vnEiHWZyaiHNrjetesF+r\r\nNzs7CztL2FgbgVrlzT9LpnL/wW9i1onJtWk/csjD4ZAd9RfSQyHbCZDlUj5w\r\nSAv/54ERkG1AEGzpbeqfvR4hKtwsLvpqbOof6ppW0VS6gkqv7dlWDP3wGBde\r\n0pw84/95GK+38AFfUB00Gl3ud4egng6M2rCS0LZYVYv9UAQXQ7koYMhWqGUY\r\nNCoRN1qXyG/oD66A8Lo7Lm62W2Qf+tN6LfNEOTLrVStNWTg+39J6ddGXyGlB\r\njQyPqsM8Flf0qgT0ZQy/7Pzuo9sA4cFp6J05EwZpf9eIDikwY3hMXkh4shv/\r\n9Oax7xUYW8/CBggsUmE0RLTTnhqFrF7Q/FZ96WLT0b99rGrbBL5YDyejiKQU\r\ntBVN2Z7vQDCXSvKRYKdNdzBe70SbZ8s7Wh2indW6oWAtQOtMrQF4gWO4J4+t\r\nFpRktjiYES2VoiNQHn1gxU2zigTNxB0HLs5YjBYGSMbIrk7PBTIaNinGyogn\r\noyaON3kkvV7VLj8UxlxwRNYT3B5SUEDEjHk=\r\n=0mAC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"d2475592c3e052fc932134c238a1c340a72b421e","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"npm run clean && npm run compile && npm run test"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/dettle.git","type":"git"},"_npmVersion":"8.19.2","description":"A tiny fully-featured debounce and throttle implementation.","directories":{},"_nodeVersion":"18.12.0","_hasShrinkwrap":false,"devDependencies":{"fava":"^0.0.7","tsex":"^1.1.4","typescript":"^4.9.4"},"_npmOperationalInternal":{"tmp":"tmp/dettle_1.0.1_1674861900066_0.5553728704158427","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"dettle","version":"1.0.2","keywords":["tiny","debounce","throttle"],"_id":"dettle@1.0.2","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"homepage":"https://github.com/fabiospampinato/dettle#readme","bugs":{"url":"https://github.com/fabiospampinato/dettle/issues"},"dist":{"shasum":"d0f772ca718709e1cc60335aa54362313527235c","tarball":"https://registry.npmjs.org/dettle/-/dettle-1.0.2.tgz","fileCount":18,"integrity":"sha512-pIVcNUx2/R7P45l3wEUsyrZcfbVUCKBmctUN41syh2asCXmrRndJEiNng9+8socNOAEBiBRqsQCh3HhCkOFwwg==","signatures":[{"sig":"MEUCIQDRJ8O1GuRSthQSYzosMzPv5at7ZtR0LypIJHUGfprsaQIgX/1Y759Y3B+eLDtPkzQpIlcrurYv8hCSHj6HR6PBdpM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13107},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"26a75367c385213be33d9a6163f3afc6359e2d94","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"tsex prepare"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/dettle.git","type":"git"},"_npmVersion":"10.2.3","description":"A tiny fully-featured debounce and throttle implementation.","directories":{},"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"devDependencies":{"fava":"^0.2.0","tsex":"^3.0.0","typescript":"^5.1.6"},"_npmOperationalInternal":{"tmp":"tmp/dettle_1.0.2_1712270076751_0.8126230395162888","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"dettle","version":"1.0.3","keywords":["tiny","debounce","throttle"],"_id":"dettle@1.0.3","homepage":"https://github.com/fabiospampinato/dettle#readme","bugs":{"url":"https://github.com/fabiospampinato/dettle/issues"},"dist":{"shasum":"0276262eaa8bc06a6d6ce98dc209d344ba708029","tarball":"https://registry.npmjs.org/dettle/-/dettle-1.0.3.tgz","fileCount":18,"integrity":"sha512-uWHJmmxWyQweX4ZyHyaQpTsU3m+7NTnMnA2O2upPGEywRCtomy2iAVFQJa0WZZkWI+bjTuOzR/IZCQZFC2QlwQ==","signatures":[{"sig":"MEQCIAIC1uGNrYY7R4sf21Q72IGbC4DdPHKvF62ZkHzqyw0lAiARuP8Nk9wRp6mxIG4XYdijpIH1Pu7eVH5aRzY9MrpY1g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13532},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"740fa485b7ca6059f2ab0f11712f40dbcd68645f","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"tsex prepare"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/dettle.git","type":"git"},"_npmVersion":"10.2.3","description":"A tiny fully-featured debounce and throttle implementation.","directories":{},"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"devDependencies":{"fava":"^0.3.2","tsex":"^4.0.2","typescript":"^5.5.2"},"_npmOperationalInternal":{"tmp":"tmp/dettle_1.0.3_1719762425915_0.42727674475084076","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"dettle","version":"1.0.4","keywords":["tiny","debounce","throttle"],"_id":"dettle@1.0.4","homepage":"https://github.com/fabiospampinato/dettle#readme","bugs":{"url":"https://github.com/fabiospampinato/dettle/issues"},"dist":{"shasum":"218679cb569a5e507e61c7ad53989fc2a0bc8bb5","tarball":"https://registry.npmjs.org/dettle/-/dettle-1.0.4.tgz","fileCount":18,"integrity":"sha512-ktaWiLYYc/ajSa819+HxwABpqtk3dGIAmo5CbHvT3B6XyQSM7VNGDvCPNu94Ptc+Ti4tjTvAKRUCXU/lrVG4WQ==","signatures":[{"sig":"MEUCIQCW5VFLfN3SrgrGqdkFWLwNoXY3AbxttYbm8lApjYe4MgIgbwTEcf4FBS+U7l+HBBe3dIY2KRv6wIWzRGaEeDAxapg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13480},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"0bcc649488cf04330b1effa973b4f3e2a86271fa","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"tsex prepare"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/dettle.git","type":"git"},"_npmVersion":"10.2.3","description":"A tiny fully-featured debounce and throttle implementation.","directories":{},"_nodeVersion":"18.19.0","_hasShrinkwrap":false,"devDependencies":{"fava":"^0.3.4","tsex":"^4.0.2","typescript":"^5.5.2"},"_npmOperationalInternal":{"tmp":"tmp/dettle_1.0.4_1719764047150_0.1232983450287044","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"dettle","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/dettle.git"},"description":"A tiny fully-featured debounce and throttle implementation.","license":"MIT","version":"1.0.5","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["tiny","debounce","throttle"],"devDependencies":{"fava":"^0.3.4","tsex":"^4.0.2","typescript":"^5.7.3"},"_id":"dettle@1.0.5","gitHead":"ce9d1f08b7f8f9d7ad9a556b11c9351eca7689d9","bugs":{"url":"https://github.com/fabiospampinato/dettle/issues"},"homepage":"https://github.com/fabiospampinato/dettle#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-ZVyjhAJ7sCe1PNXEGveObOH9AC8QvMga3HJIghHawtG7mE4K5pW9nz/vDGAr/U7a3LWgdOzEE7ac9MURnyfaTA==","shasum":"ed3a526012b2faf0ec0f0f907929019a78091445","tarball":"https://registry.npmjs.org/dettle/-/dettle-1.0.5.tgz","fileCount":11,"unpackedSize":7826,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDlNyqApE4q5iUtQZYDU1T5OGkYbSHQm0VR6HrMim6EEAiB31NFORWsDOmhtURLU5zo7yUq9R2karRTZeJJD6PeEeA=="}]},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dettle_1.0.5_1736632833226_0.7293312683694275"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-27T19:51:17.366Z","modified":"2025-01-11T22:00:33.590Z","1.0.0":"2023-01-27T19:51:17.498Z","1.0.1":"2023-01-27T23:25:00.225Z","1.0.2":"2024-04-04T22:34:36.985Z","1.0.3":"2024-06-30T15:47:06.072Z","1.0.4":"2024-06-30T16:14:07.287Z","1.0.5":"2025-01-11T22:00:33.424Z"},"bugs":{"url":"https://github.com/fabiospampinato/dettle/issues"},"homepage":"https://github.com/fabiospampinato/dettle#readme","keywords":["tiny","debounce","throttle"],"repository":{"type":"git","url":"git+https://github.com/fabiospampinato/dettle.git"},"description":"A tiny fully-featured debounce and throttle implementation.","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"readme":"# Dettle\n\nA tiny fully-featured debounce and throttle implementation.\n\n## Install\n\n```sh\nnpm install --save dettle\n```\n\n## Usage\n\n```ts\nimport {debounce, throttle} from 'dettle';\n\nconst fn = () => console.log ( 'Fired!' );\n\n// Debouncing\n// The following options are supported:\n// `leading`: whether the function should be called when the timeout is created, defaults to `false`\n// `trailing`: whether the function should be called when the timeout expires, defaults to `true`\n// `maxWait`: the maximum amount of time that can pass before the function is called, defaults to `Infinity`\n\nconst debounced = debounce ( fn, 1000, {\n  leading: false,\n  trailing: true,\n  maxWait: Infinity\n});\n\ndebounced (); // Schedule function for execution\ndebounced (); // Re-schedule function for execution\n\ndebounced.flush (); // Execute the function immediately, if there's a scheduled execution\ndebounced.cancel (); // Cancel the scheduled execution\n\n// Throttling\n// The API for throttling is basically the same, except that:\n// - `leading`: is `true` by default rather than `false`\n// - `maxWait`: is set implicitly for you to be equal to the wait time\n\nconst throttled = throttle ( fn, 1000, {\n  leading: true,\n  trailing: true\n});\n\nthrottled (); // Call the function immediately\nthrottled (); // Schedule function for execution\n\nthrottled.flush (); // Execute the function immediately, if there's a scheduled execution\nthrottled.cancel (); // Cancel the scheduled execution\n```\n\n## License\n\nMIT © Fabio Spampinato\n","readmeFilename":"readme.md","license":"MIT"}