{"_id":"debounceify","_rev":"3-59767a7951e6ebc0c10bc0c8315ab310","name":"debounceify","dist-tags":{"latest":"1.1.0"},"versions":{"0.0.0":{"name":"debounceify","version":"0.0.0","description":"Tiny async debouncer","main":"index.js","dependencies":{},"devDependencies":{"standard":"^16.0.3","tape":"^5.1.1"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/debounceify.git"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/debounceify/issues"},"homepage":"https://github.com/mafintosh/debounceify","gitHead":"f88fd9fb6a210d1fa729b8638a69d3fcb7f47ed5","_id":"debounceify@0.0.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-hZr0IelDaZG4zVdZcmmo56ZXUuAF00iDkz9lGgQvxf/z9IhUWMnNcE4F0Z0shZLVKyYba/wK3+ExtyQTEtqhVg==","shasum":"8cff73f5498144c3e3be9bf186f69a2af93192c8","tarball":"https://registry.npmjs.org/debounceify/-/debounceify-0.0.0.tgz","fileCount":5,"unpackedSize":3742,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBFw2CRA9TVsSAnZWagAA2QMP/RYH5FwONAN+Y7WL2YLT\nw4dfd0Yk4gckjSLnisLFNkrLhtz9yx7qkzJlSJNuwLXQVpbhaR08R1NBxYoX\nSxVCqxyzfuwuS44kwn/Qydhjd2JKxGo6FNkqlQWU3RMjFlp/B7XSiOKhBeyd\n1/s5rrj2niHvAHJpiVVMLSxXjjuxP4NYcd2ok2MQ9TCJgbFtXMn4hW5h8nIP\n2BvHqE8UKVKq079JnwiDVeCkcDOjpDa/hjWdqtugW0luMZzcmL/AAYamzV3C\nZjfnPNbIld1KF211cwod4/FuBm6jtcYsk5Pwaf+HEVcharVKh6oIUFZOMGh5\nLVjDqk5VhwVKV9nZEm5brd/7JwwqNxjHILx7f3JaCD71ptjJmFUo/oqN5erk\nb5tB3PQ/BWezw31tjMnmYmQQsh+Vy2nwfcGGLNeiSFD9eYgQ7nTdtzgXSaAP\npLHFHxi8gwu5c9MuO8REVVV5aAEKV07hyNfIvb6sY7wfsbzp/vByw8F7Oedh\nHHnqUYoMP8QF81Ixmos64Y6yVJNOphoytcj+eEIGbRIAlP+ixLABFe7YnPGu\nB8epQvbQbKlUdZKzwm914Uf9+6C+0kbTzJVVcxU8xA2U8Q9fJCVofk+Dl84A\niN826yXpXBAWTz+3KprGq27ZlRD+CtEIXRx2l5CYq8fIneZKRfbV4dslI6Dm\nDiLk\r\n=KfeC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWVgvfzu2pvq0Svb41l2/ylizd0iIroTSTJ82GvENqJwIhANr6FPDq/o9it6uufNb014nEvv1RNN1BwRxYbKYWHFDc"}]},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/debounceify_0.0.0_1610898485900_0.8097116779755336"},"_hasShrinkwrap":false},"1.0.0":{"name":"debounceify","version":"1.0.0","description":"Tiny async debouncer","main":"index.js","dependencies":{},"devDependencies":{"standard":"^16.0.3","tape":"^5.1.1"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/debounceify.git"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/debounceify/issues"},"homepage":"https://github.com/mafintosh/debounceify","gitHead":"7c43d8ed063f3a2e16782a6bc65b496fc1b8fe42","_id":"debounceify@1.0.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-7BeSMAPUohdDJ7sU6Tq2M8HkJR05IqQCeVm/qNemrpOgP5SGZD5WeNOXNfsgbESinz6OjMooWPTGZiKUX91XJQ==","shasum":"182889d32bab2dbcc0ad76861f9332f4a6509ff1","tarball":"https://registry.npmjs.org/debounceify/-/debounceify-1.0.0.tgz","fileCount":5,"unpackedSize":3732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBF07CRA9TVsSAnZWagAAJtEP/Akg/DgaV+E3dFrrGPpq\nRl7JFe2bbMVSGzi+wnMkRY7N4ZfEJZbHDDI6bJBnWar160uPp5/HQONVa4Gc\nFys1luWQQLLKIH1gq39BwtyZHfMQN7Y3Zvopb7NsPwgG9glyxwqtNFayj5/m\n/X/7IFXK0JN+jEP/ZgsDjHYbr2vDKoQLjldEsuUiD6FdIG0ExeKgj7Ej9vhp\nb8Gnj1Ek9Uel919MRizBLe/fCXClm5CGMapPYMqhC5hL0Q6BiNBSG0e9vzXd\nJd5sBCNLcHC1jo/8fC5xRx4yTqqIIsBqrWeFug/jWlRYWSpQccjQktD/b+K7\nUtHaq95xFHSXL0B3B2ZxhBq1jEcZ0uFK4XOEWh/nkpS3S1388AUuArrMU8EP\nJfq7WPs3KriBs6Xr0AUnJeFa+xq2mmk2fxkeYkrcX5R+YaboY7rZoy9nLbcx\nTdxCYjIsrK6vBb8rC82rrB51en7S3wLyHThPERgYc+AQOC2OQd/5Q6AQA4DX\n54Yl+h6S7carHvUwLH0I42gC0FLtBEjru7ew/UJzODaqz/qI7B9D2ng5ybjm\n/1LG1v/oGTtzUqAXgJREDDzJ/ZtYgzsuj2SMM5z40FSlN/HPjPsDxCWl5kAA\n5ONmr1agOKtR3rFabriZhjT3TcVDE8xGqS0bEYE93x1oCoPwSCTT3IEGI5eO\nX/Rs\r\n=kzHu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdLwXeeQTmBVwbqLCp8J6dRpZCnN/KHz5luTRi4Cs7eAIgOVEXyxRQ1ZqZKkUlOINUhGxwZYNN5GRgIhzzNXTyK8c="}]},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/debounceify_1.0.0_1610898747177_0.0007538820936270341"},"_hasShrinkwrap":false},"1.1.0":{"name":"debounceify","version":"1.1.0","description":"Tiny async debouncer","main":"index.js","dependencies":{},"devDependencies":{"standard":"^16.0.3","tape":"^5.1.1"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/debounceify.git"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/debounceify/issues"},"homepage":"https://github.com/mafintosh/debounceify","_id":"debounceify@1.1.0","gitHead":"97ba02c8ef8e89176495dd99b1cb952ab100c761","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-eKuHDVfJVg+u/0nPy8P+fhnLgbyuTgVxuCRrS/R7EpDSMMkBDgSes41MJtSAY1F1hcqfHz3Zy/qpqHHIp/EhdA==","shasum":"393505192ab1c2a0e6bb2fe9bc87bc04009a3a7e","tarball":"https://registry.npmjs.org/debounceify/-/debounceify-1.1.0.tgz","fileCount":5,"unpackedSize":3889,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDbzW0TD46DXZ7ZJP9hkpe8czyMtqyjynX5cep1wX1CLAiAQmgCkmHPynFn/dFqbJCEs+A30o7MQKLD4JqI81XMRnA=="}]},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/debounceify_1.1.0_1705070503300_0.9628001987911556"},"_hasShrinkwrap":false}},"time":{"created":"2021-01-17T15:48:05.900Z","0.0.0":"2021-01-17T15:48:06.016Z","modified":"2024-01-12T14:41:43.654Z","1.0.0":"2021-01-17T15:52:27.280Z","1.1.0":"2024-01-12T14:41:43.457Z"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"description":"Tiny async debouncer","homepage":"https://github.com/mafintosh/debounceify","repository":{"type":"git","url":"git+https://github.com/mafintosh/debounceify.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"bugs":{"url":"https://github.com/mafintosh/debounceify/issues"},"license":"MIT","readme":"# debounceify\n\nTiny async debouncer\n\n```\nnpm install debounceify\n```\n\n## Usage\n\n``` js\nconst debounceify = require('debounceify')\n\nconst debounced = debounceify(async function () {\n  console.log('Running...')\n  await new Promise(resolve => setTimeout(1000, resolve))\n})\n\nconst a = debounced() // triggers the about function\nconst b = debounced()\nconst c = debounced()\nconst d = debounced() // these last 3 wait for the first one to finish\n                      // then trigger one more.\n\nawait a\nawait b\nawait c\nawait d\n```\n\n## API\n\n#### `fn = debounceify(asyncFunction)`\n\nDebounces the `asyncFunction` so that\n\n1. No parallel executions of `asyncFunction` will happen\n2. Debounces the stack, so if 10 calls happen while `asyncFunction` is running only one more will be triggered when it finishes.\n3. Forwards errors and return values.\n\n#### `debounceify.running`\n\nThe active running job, `null` if none.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}