{"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":"http://registry-npm.ywwl.com/debounceify/download/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="}],"size":1907,"noattachment":false,"key":"/debounceify/-/debounceify-1.0.0.tgz"},"_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,"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","publish_time":1610898747280,"_cnpm_publish_time":1610898747280,"dist-tags":{"latest":"1.1.0"}}