{"_id":"@darshanahire/use-debounce","_rev":"2-7752015ac42a7b4ef7c0eb9ca18a0e8a","name":"@darshanahire/use-debounce","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@darshanahire/use-debounce","version":"1.0.0","keywords":[],"author":{"name":"Darshan Ahire"},"license":"ISC","_id":"@darshanahire/use-debounce@1.0.0","maintainers":[{"name":"darshanahire","email":"darshanahire101@gmail.com"}],"dist":{"shasum":"5e6a9fc3b7083d2e82fc2490662853a339a0d52e","tarball":"https://registry.npmjs.org/@darshanahire/use-debounce/-/use-debounce-1.0.0.tgz","fileCount":3,"integrity":"sha512-CCDFM1fBb+d+Amyde9PkvAgFxLX3XqFVtztRfX86BRpBC2wbSWjplhURr5HPVM+BJhzLLMhL3ixajJVsSk8KhA==","signatures":[{"sig":"MEUCIQDZsx3zjEEIA0p5x6wpHZ8WS29lDE/ziGa3VDiTrycwrgIgdAJJyY5opoh3sVCHof02GI6eag/BsKgh+yY5hUScGvE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":596},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"darshanahire","email":"darshanahire101@gmail.com"},"_npmVersion":"10.9.2","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/use-debounce_1.0.0_1745405397896_0.36091035178288955","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@darshanahire/use-debounce","version":"1.0.1","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":{"name":"Darshan Ahire"},"license":"ISC","description":"A lightweight utility function to debounce any callback in JavaScript or Node.js. Useful for optimizing performance by limiting the rate at which a function is executed.","_id":"@darshanahire/use-debounce@1.0.1","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-toazx8oMuK7jrc7pLfd4c1Z04oe9SObbm7gwFhIb3/63nJ11mhWixnp+YSEJHH6NVfmdCAc2Kow6MelYssJy8w==","shasum":"eee2ce9899595a563ca96acb6c225f5638d3550a","tarball":"https://registry.npmjs.org/@darshanahire/use-debounce/-/use-debounce-1.0.1.tgz","fileCount":4,"unpackedSize":1569,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCAxl97pxRnAi0Q23yeklMaKz7WATLFTnptsGLn0P204QIhAO1VDdqT/yUZO8sRje7f1f5CpehP/8DbI/7c/gAL/YwG"}]},"_npmUser":{"name":"darshanahire","email":"darshanahire101@gmail.com"},"directories":{},"maintainers":[{"name":"darshanahire","email":"darshanahire101@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/use-debounce_1.0.1_1745405870833_0.6039760878353841"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-23T10:49:57.800Z","modified":"2025-04-23T10:57:51.171Z","1.0.0":"2025-04-23T10:49:58.054Z","1.0.1":"2025-04-23T10:57:51.005Z"},"author":{"name":"Darshan Ahire"},"license":"ISC","keywords":[],"maintainers":[{"name":"darshanahire","email":"darshanahire101@gmail.com"}],"readme":"# 🕒 use-debounce\r\n\r\nA lightweight utility function to debounce any callback in JavaScript or Node.js. Useful for optimizing performance by limiting the rate at which a function is executed.\r\n\r\n---\r\n\r\n## 📦 Installation\r\n\r\n```bash\r\nnpm install use-debounce\r\n```\r\n\r\n---\r\n\r\n## 🚀 Usage\r\n\r\n```js\r\nconst debounce = require(\"use-debounce\");\r\n\r\nconst log = () => {\r\n  console.log(\"Debounced call\");\r\n};\r\n\r\nconst debouncedLog = debounce(log, 1000);\r\n\r\n// Simulate rapid calls\r\ndebouncedLog();\r\ndebouncedLog();\r\ndebouncedLog(); // Only this one will execute after 1 second\r\n```\r\n\r\n---\r\n\r\n## 🔧 API\r\n\r\n### `debounce(callback, delay)`\r\n\r\n- `callback` – the function you want to debounce\r\n- `delay` – the delay in milliseconds\r\n\r\nReturns a debounced version of your callback.\r\n\r\n---\r\n\r\n## 🛠️ Example Use Cases\r\n\r\n- Debouncing user input in CLI or UI\r\n- Limiting API calls\r\n- Improving performance on scroll, resize, or typing events\r\n\r\n---\r\n\r\n## 📄 License\r\n\r\nMIT\r\n","readmeFilename":"README.MD","description":"A lightweight utility function to debounce any callback in JavaScript or Node.js. Useful for optimizing performance by limiting the rate at which a function is executed."}