{"_id":"@arnellebalane/debounce","_rev":"4-33700b0e1adcedbba0355d6432db1994","name":"@arnellebalane/debounce","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@arnellebalane/debounce","version":"1.0.0","description":"Limit the rate at which a callback function is executed","main":"dist/debounce.js","source":"debounce.js","scripts":{"clean":"rm -rf dist","prebuild":"npm run clean","build":"microbundle --name debounce","prebuild:watch":"npm run clean","build:watch":"microbundle --name debounce --watch","test":"nyc -r html -x *.tests.js babel-tape-runner debounce.tests.js | tap-color && nyc report"},"keywords":["debounce"],"author":{"name":"Arnelle Balane","email":"arnellebalane@gmail.com","url":"https://arnellebalane.com/"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/arnellebalane/debounce.git"},"bugs":{"url":"https://github.com/arnellebalane/debounce/issues"},"homepage":"https://github.com/arnellebalane/debounce#readme","devDependencies":{"@babel/core":"7.1.2","@babel/preset-env":"7.1.0","babel-tape-runner":"3.0.0","microbundle":"0.7.0","nyc":"13.1.0","riteway":"3.0.1","sinon":"7.1.1","tap-color":"1.1.0"},"babel":{"presets":["@babel/preset-env"]},"publishConfig":{"access":"public"},"gitHead":"f84420f47c0fa5d715e61d3336b8f6b819398e1c","_id":"@arnellebalane/debounce@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.11.3","_npmUser":{"name":"arnellebalane","email":"arnellebalane@gmail.com"},"dist":{"integrity":"sha512-jupZ/eHYtx1gipNwUIhA4foBe75StZQpfE8XO5OMwJ0RNkLtfgV26XMYNXHGOcW1PpYoFj32TGp6iyNf4pwVug==","shasum":"070a50acfe644c502ecf0d6d59c50fd363190f04","tarball":"https://registry.npmjs.org/@arnellebalane/debounce/-/debounce-1.0.0.tgz","fileCount":12,"unpackedSize":15259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb3ddMCRA9TVsSAnZWagAALdYQAJeb5MtBMl/ldupTSLaN\nvPUuK2xTUx/ht/PiDwJwypRT51ptuXPbBGz/xCmaUPnVnqBMcb35ohYr46C7\n6wVj4Dle83jC+U3DZ5lSQkXzK71kGFXN3Vvlwtd6iQbwDEndXq36uILnS9s/\nDluMX7Xs7jNmUbXqUWJIccMCEdPspWZ/aDlyprZz/VRGDNIaiY26V9SkeHfE\nHn+7g/FWZa3X++mRHTHFX0V9vWyaM4D288Lqk0NrdkEFEgxbNClSfiEZvHXr\nY8wR5jD4qfuRajwTcjPoEcsy99QLqShm4xC7yoOPDEtomBE9VLjd5GtqayCb\nM/gO6QlaytD1qDw3KLotmU30B6olEkDUt0anhV/HmQpk1vbLBMN+/vx2nvBK\nC3RivIXPZVvqi12gyYq+7nbQ/CLFJK9T1JcUTI5JRjaFkJdpBxEJnZhtPpxv\n2AgRghz6I3ZkmoZyocNQv8y6+tNggPRYQWSdwGOwfEFC1bWOaw10t8EhA62l\ndthpsGWETbqxDYuTDOzzpzvqqDU8h8hBYGQb32gRc8ZNCO8NocLvmJrodyAw\n4WxEzwXk8eX0gDQ5OuqF7tU3nK3S36ZTzej4im/p7V0sj3X0r6jN9cqbPdb4\ntv31TPlu8qQTNpuKoqdsBm55ATj/9ea+LOw5iXhiU97pTxGqg+1bQNK0t5gL\nUzq/\r\n=HE8u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCHwVPYKRAnrJjp34dLDqkqNWJpyUA9cR8pcvrCf0dFAIgD5DaKyGIxpM52Z9r0sOvzY9pz1DPE98T73cWgq6ldSY="}]},"maintainers":[{"name":"arnellebalane","email":"arnellebalane@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/debounce_1.0.0_1541265228192_0.49975903095782925"},"_hasShrinkwrap":false},"1.0.1":{"name":"@arnellebalane/debounce","version":"1.0.1","description":"Limit the rate at which a callback function is executed","main":"dist/debounce.js","source":"debounce.js","scripts":{"clean":"rm -rf dist","prebuild":"npm run clean","build":"microbundle --name debounce","prebuild:watch":"npm run clean","build:watch":"microbundle --name debounce --watch","test":"nyc -r html -x *.tests.js babel-tape-runner debounce.tests.js | tap-color && nyc report"},"keywords":["debounce"],"author":{"name":"Arnelle Balane","email":"arnellebalane@gmail.com","url":"https://arnellebalane.com/"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/arnellebalane/debounce.git"},"bugs":{"url":"https://github.com/arnellebalane/debounce/issues"},"homepage":"https://github.com/arnellebalane/debounce#readme","devDependencies":{"@babel/core":"7.1.2","@babel/preset-env":"7.1.0","babel-tape-runner":"3.0.0","microbundle":"0.7.0","nyc":"13.1.0","riteway":"3.0.1","sinon":"7.1.1","tap-color":"1.1.0"},"babel":{"presets":["@babel/preset-env"]},"publishConfig":{"access":"public"},"gitHead":"3b5e47421ded471233d928a4f32473d4f3148c16","_id":"@arnellebalane/debounce@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.11.3","_npmUser":{"name":"arnellebalane","email":"arnellebalane@gmail.com"},"dist":{"integrity":"sha512-J6HqPSA+oV8LhAk5TJYdgV+TA9usXzbtpvU6P4UCALcvMpGO65+YGGxCsS2D++OwapPkIOMWR318ceJl4Qsqdw==","shasum":"f359aee9b62b123ce5abbb1120e7ec9cadb70ed8","tarball":"https://registry.npmjs.org/@arnellebalane/debounce/-/debounce-1.0.1.tgz","fileCount":12,"unpackedSize":15414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb3dfXCRA9TVsSAnZWagAAxyEP/j+INB9uTTlAOSu3qd0q\nPd6kZl5k3urKG0yXs0BXzFzMv4RrGAEjMvH8bTndX2xla+a5r41ABTmUTy9d\nYyzII2lQNzjMmuvJI2sQc26AXETOiGR+qbjpgCDUr5qEXol1DQw4I03sy98V\nE95lXYzF5Rp7XfaQAAyAHrskVzsrLXK6GnQ2a0MYkfpC14ce/+IgSZSsIfMm\n397ZJvkUQaqHkz849bgGoJpTQ/V6X60hwXrg0yo0tArrvXxD09BYDG546o9G\nmpeT5W8VBuZJYyqIMw/GgRP9X1I/W5vLYIAI0D8FpPrTGIBr8jPCSK3O8cXJ\n9iXZyYygzhUN85rY5gKJFrASnT2NhzAmEDTvQrcSvhIZJEMfiR0ORkjYHHcW\nGU/ZGMVIhC9KPqoefC7DxY5G79Zx4S+lrJ5nXb5iskQdKsfnSwhvz/I3kvKS\nwjCltZJ/spnlGIFuoweJ4aOXC49xbzre3tlnH7uiuxYOykqoC160DteWz6JE\nszFDcqM9I4aEZMh3uEwyZ2Gh9xy/rNtCG+EtBPSaC0xZGlXjM5ZNgD0B7QhU\nu1rUFYOmsTssFXDgw95IVldBqp3iQ5apjrNV68kebcT3Dip6Wif04c6V9vbM\n1iJ95Rr3ggcV9+D+h90+DlfHLKY6EVqdSHjELGmU4A9MiEHFKbHW6LAjPMKw\nDGfL\r\n=YRE8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFWMwQh2Ad1H9TCgwF7RaU+iGVkigIPINEfIlnchqcyBAiARqaPp+FyXuS9ffXIE3d03zr8OuelxXvBDyQK+ISQRAA=="}]},"maintainers":[{"name":"arnellebalane","email":"arnellebalane@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/debounce_1.0.1_1541265367439_0.6986773836774218"},"_hasShrinkwrap":false},"1.1.0":{"name":"@arnellebalane/debounce","version":"1.1.0","description":"Limit the rate at which a callback function is executed","main":"dist/debounce.js","source":"debounce.js","scripts":{"clean":"rm -rf dist","prebuild":"npm run clean","build":"microbundle --name debounce","prebuild:watch":"npm run clean","build:watch":"microbundle --name debounce --watch","test":"nyc -r html -x *.tests.js babel-tape-runner debounce.tests.js | tap-color && nyc report","lint":"eslint *.js"},"keywords":["debounce"],"author":{"name":"Arnelle Balane","email":"arnellebalane@gmail.com","url":"https://arnellebalane.com/"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/arnellebalane/debounce.git"},"bugs":{"url":"https://github.com/arnellebalane/debounce/issues"},"homepage":"https://github.com/arnellebalane/debounce#readme","devDependencies":{"@babel/core":"7.1.2","@babel/preset-env":"7.1.0","babel-tape-runner":"3.0.0","eslint":"5.8.0","eslint-config-arnellebalane":"1.3.0","microbundle":"0.7.0","nyc":"13.1.0","riteway":"3.0.1","sinon":"7.1.1","tap-color":"1.1.0"},"babel":{"presets":["@babel/preset-env"]},"eslintConfig":{"extends":["eslint-config-arnellebalane"],"parserOptions":{"sourceType":"module","ecmaVersion":2017,"ecmaFeatures":{"modules":true}},"env":{"browser":true,"es6":true,"node":true},"rules":{"new-cap":["off"]}},"publishConfig":{"access":"public"},"gitHead":"a0610dd1b6639d00ef6c80f62b57f7ae53c7648c","_id":"@arnellebalane/debounce@1.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.11.3","_npmUser":{"name":"arnellebalane","email":"arnellebalane@gmail.com"},"dist":{"integrity":"sha512-L/YFptaulBtaZfQ6B4rj6FQP5ZjgNGsFRrtx6btS6p+VHP5+PViEMPK+zQGOe+10rUL1Mt1iF1vSUk56Y6qEHw==","shasum":"c82d986a02ef7ba1a883fd2e30c794f929d9872b","tarball":"https://registry.npmjs.org/@arnellebalane/debounce/-/debounce-1.1.0.tgz","fileCount":13,"unpackedSize":16815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb3vU1CRA9TVsSAnZWagAA/ZoP/2yKtM7uqE9WGoYv9l66\nRsKK57a7qVhDd3ywX8ZH+qLhXQN03+iFrq0X1xb9DhlgJzBjauWzQd4SR1qd\nQDg20jM56yfXE8z/LEeh1T6czdRSAETFH3Njzm1pWkCdM1RYc+Z46JJboYSw\nrkJ51fGnCBePvBPCqtQQ7KDLhbs1CpHu0YuUTQgi+KWEHxnEyfEXkZBoEx9+\nYUsoMs6NqMMFqtxcrln3mo4OW7M05l9PfzrpCHEgJ8XvArFs7gwq06HnOT2P\nFllFOyfRVAB/qiLngXUfrxExDNTYmaw9YnkbHOQPJpteYHdo/EbY4Fixv920\no8l3zfo5//3AocWMrLF8q3Z2fgwOuphARnoxx/TDS24pJlCluDxuvpfwFabG\nn9hMqIAscZXqbLY9kvwJuM8fiDfToIPtwZ36I4D9DL146VE6U/MTqZttB2AL\nti58Q7R9ZWfVKGyV/OOskBlyvhbJmv9q/6KvFas0GUbeu4aDSZEya5TaM3F8\nxG09eeg9dn5zapzOUwoKoBORfv0oZY8lX34fagLWVzDAxtmMKNyUxK5Bx5/W\nPu9xYhU5q6zC7jtPxxrv7m/A3hC05xdTWtqa4R7lqelbCRvQ9hlBffDw3Bjq\nt4Tt8ZuKOtecOUpmZTd67V0h7TV9DKbcx8JFOybk3s85hfk+pPlBNbzn3ckE\nJeSz\r\n=mVxS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDymSYyZcPgHx6k6dUeQFeuoG+XoK45nYXTsw6frC6lMgIhAL/zczDyaC73Cm1vUMc6LHZOqV4oDvG36c2NYzm+0vCk"}]},"maintainers":[{"name":"arnellebalane","email":"arnellebalane@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/debounce_1.1.0_1541338420526_0.37646008598780156"},"_hasShrinkwrap":false},"1.2.0":{"name":"@arnellebalane/debounce","version":"1.2.0","description":"Limit the rate at which a callback function is executed","main":"dist/debounce.js","source":"debounce.js","scripts":{"clean":"rm -rf dist","prebuild":"npm run clean","build":"microbundle --name debounce","prebuild:watch":"npm run clean","build:watch":"microbundle --name debounce --watch","test":"nyc -r html -x *.tests.js babel-tape-runner debounce.tests.js | tap-color && nyc report","lint":"eslint *.js","flow":"flow"},"keywords":["debounce"],"author":{"name":"Arnelle Balane","email":"arnellebalane@gmail.com","url":"https://arnellebalane.com/"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/arnellebalane/debounce.git"},"bugs":{"url":"https://github.com/arnellebalane/debounce/issues"},"homepage":"https://github.com/arnellebalane/debounce#readme","devDependencies":{"@babel/core":"7.1.2","@babel/plugin-transform-flow-strip-types":"7.0.0","@babel/preset-env":"7.1.0","babel-eslint":"10.0.1","babel-tape-runner":"3.0.0","eslint":"5.8.0","eslint-config-arnellebalane":"1.3.0","eslint-plugin-flowtype":"3.2.0","flow-bin":"0.85.0","microbundle":"0.7.0","nyc":"13.1.0","riteway":"3.0.1","sinon":"7.1.1","tap-color":"1.1.0"},"babel":{"presets":["@babel/preset-env"],"plugins":["@babel/plugin-transform-flow-strip-types"]},"eslintConfig":{"parser":"babel-eslint","extends":["eslint-config-arnellebalane","plugin:flowtype/recommended"],"plugins":["flowtype"],"parserOptions":{"sourceType":"module","ecmaVersion":2017,"ecmaFeatures":{"modules":true}},"env":{"browser":true,"es6":true,"node":true},"rules":{"new-cap":["off"]}},"publishConfig":{"access":"public"},"gitHead":"5750f16169a31b70b02b8ef64f35e566d47f3dd7","_id":"@arnellebalane/debounce@1.2.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"arnellebalane","email":"arnellebalane@gmail.com"},"dist":{"integrity":"sha512-1VHmK9gCTDAZGjKyUh3We63oEuHaC/ZQFxCQabcvCshKWaqxMAzL6lBxuF0GZRE9xbXBV3Zswu/cYRaHmFduog==","shasum":"1ba71e5c4f24c734bda84e528f74d64cf2c48fe7","tarball":"https://registry.npmjs.org/@arnellebalane/debounce/-/debounce-1.2.0.tgz","fileCount":14,"unpackedSize":14314,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb3/syCRA9TVsSAnZWagAAwiMP/jO98qmfiCccfqux1nLF\n6Y4H4bkPA/sSLUry/k7TJ1kJKS0PQGkATPZM83f3UqN79HnJMGDIxXA2TgNp\nrtGtj6RIrhQ0sa9o57S1OHsGIIMeAV8RRKXL+SomxbwkrjWklMKCfrHP3bF0\nLhyIuf7Z8l2xJGKNFCMZBaPXHkIJUwXbb+6Iyys3DVDlIamtEtCkUIDQnPYX\niJF3I54PueRVj33GEhm0tENw8azOi0RxSbnFYOUY1uHzez2omKaNQmPV/lsB\nKHqUeg/5Q2qqENZUjybiOMGGNPQGfqxuY/DrcFzkHhj5RBX+S68UMjQmjRgb\nIHmg+wUzw58s9QtnlC965XVlK8AL3MSljZsCMmM4spRapYQQnFe8GU+fOXTg\nNW4XLLbCcexy/qWPPKOjeJbefwF5xAhrFnOYnWa8MbDvqdSS0f3fYeiSwV7C\njycI5l45mSco1mGS34YDpXt+/IxpkDeBC2TwFxHazZjmDisPX9XPgTxy2ooo\n8zCMIM4JaS3yT6uXjUDC97282zType3A8NFxUrhaoTV4TwZV5L0qfijY6VeY\nJP6sf8F+ZQqRYGYU0E+oNjoelWK7YfMZYq+uXpZV9OuutMrgex2iI+UpBXT+\nI6VOIeYnAow6oxEHdMib9DD/1LQBywgzRRu4i2pM00gYZbXzL/17fcsuALaF\nV9ka\r\n=Kfu1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTlX8LqpZMkyo/35PAnTyM2Y3TQEhvXD1Svv2rp+hOgwIhAKPsVmAZE778kWQg8Uj6exkQp7B3OMtu5D5EQeyXkyYn"}]},"maintainers":[{"name":"arnellebalane","email":"arnellebalane@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/debounce_1.2.0_1541405490374_0.8595806566774291"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-03T17:13:48.034Z","1.0.0":"2018-11-03T17:13:48.300Z","modified":"2022-04-04T15:33:48.989Z","1.0.1":"2018-11-03T17:16:07.529Z","1.1.0":"2018-11-04T13:33:40.625Z","1.2.0":"2018-11-05T08:11:30.489Z"},"maintainers":[{"name":"arnellebalane","email":"arnellebalane@gmail.com"}],"description":"Limit the rate at which a callback function is executed","homepage":"https://github.com/arnellebalane/debounce#readme","keywords":["debounce"],"repository":{"type":"git","url":"git+https://github.com/arnellebalane/debounce.git"},"author":{"name":"Arnelle Balane","email":"arnellebalane@gmail.com","url":"https://arnellebalane.com/"},"bugs":{"url":"https://github.com/arnellebalane/debounce/issues"},"license":"MIT","readme":"# debounce\n\nLimit the rate at which a callback function is executed.\n\n\n## Installation\n\nInstall via npm (or yarn):\n\n```bash\nnpm install @arnellebalane/debounce\n```\n\nOr via CDN (unpkg.com):\n\n```html\n<script src=\"https://unpkg.com/@arnellebalane/debounce/dist/debounce.umd.js\"></script>\n```\n\n\n## Usage\n\nThis package exposes a `debounce` function:\n\n```js\nimport debounce from '@arnellebalane/debounce';\n\nfunction someFunction() { /**/ }\n\nconst debounced = debounce(someFunction, 1000);\n// Multiple calls to `debounced` that are less than 1000 milliseconds apart\n// only get executed once. Everything that's passed to `debounced` is forwarded\n// to `someFunction`.\n```\n\nThis function is exposed as `window.debounce` when not using AMD or CommonJS.\n\n\n## API\n\n- **`debounce(callback, duration, options)`**:\n  - Parameters:\n    - `callback` (`Function`): The function that needs to be debounced/rate-limited.\n    - `duration` (`Number`): The delay, in milliseconds, between successive calls.\n      Calls that are less that this value apart from each other are treated as one.\n    - `options` (`Object`, optional):\n      - `immediate` (`Boolean`, default=`true`). Whether to execute the callback\n        at the beginning of the first call or at the end of the last call.\n  - Returns: `Function`. Everything that's passed to this returned function is\n    forwarded to the given callback function.\n\n\n## Contributing\n\nAny form of contribution into this repository is welcome and greatly appreciated.\n\n1. Fork this repository and clone your fork.\n2. Apply your changes. Make sure to add tests for those changes.\n3. Run tests: `npm test`.\n4. File a Pull Request into this repository.\n\n\n## License\n\nMIT License\n","readmeFilename":"readme.md"}