{"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":"http://registry-npm.ywwl.com/debounceify/download/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"}],"size":1916,"noattachment":false,"key":"/debounceify/-/debounceify-0.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_0.0.0_1610898485900_0.8097116779755336"},"_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":1610898486016,"_cnpm_publish_time":1610898486016,"dist-tags":{"latest":"1.1.0"}}