{"_id":"stifle","_rev":"2840266","name":"stifle","description":"A very simple way to throttle a function","dist-tags":{"latest":"1.1.1"},"maintainers":[{"name":"twobitfool","email":"matt@twobitfool.com"}],"time":{"modified":"2022-09-06T15:51:07.000Z","created":"2018-01-31T17:44:56.244Z","1.1.1":"2019-07-29T16:57:44.855Z","1.1.0":"2018-06-04T18:29:33.401Z","1.0.4":"2018-01-31T19:12:16.834Z","1.0.2":"2018-01-31T18:08:15.992Z","1.0.1":"2018-01-31T18:00:56.662Z","1.0.0":"2018-01-31T17:44:56.244Z"},"users":{},"author":{"name":"Matt Smith","email":"matt@twobitfool.com"},"repository":{"type":"git","url":"git+https://github.com/twobitfool/stifle.git"},"versions":{"1.1.1":{"name":"stifle","version":"1.1.1","description":"A very simple way to throttle a function","main":"index.cjs.js","module":"index.esm.js","repository":{"type":"git","url":"git+https://github.com/twobitfool/stifle.git"},"author":{"name":"Matt Smith","email":"matt@twobitfool.com"},"license":"MIT","scripts":{"build":"rollup -i index.esm.js -o index.cjs.js -f cjs","test":"mocha -r esm","prepublish":"yarn build"},"devDependencies":{"chai":"^3.5.0","esm":"^3.0.36","mocha":"^3.3.0","rollup":"^0.59.1"},"gitHead":"38eb062aa953736ddae93d4edef5826e1c9de3d2","bugs":{"url":"https://github.com/twobitfool/stifle/issues"},"homepage":"https://github.com/twobitfool/stifle#readme","_id":"stifle@1.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"twobitfool","email":"matt@twobitfool.com"},"dist":{"shasum":"4e4c565f19dcf9a6efa3a7379a70c42179edb8d6","size":2253,"noattachment":false,"key":"/stifle/-/stifle-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stifle/download/stifle-1.1.1.tgz"},"maintainers":[{"name":"twobitfool","email":"matt@twobitfool.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stifle_1.1.1_1564419464733_0.9549929593398496"},"_hasShrinkwrap":false,"publish_time":1564419464855,"_cnpm_publish_time":1564419464855,"_cnpmcore_publish_time":"2021-12-16T11:29:14.254Z"},"1.1.0":{"name":"stifle","version":"1.1.0","description":"A very simple way to throttle a function","main":"index.cjs.js","module":"index.esm.js","files":["index.cjs.js","index.esm.js"],"repository":{"type":"git","url":"https://github.com/twobitfool/stifle"},"author":{"name":"Matt Smith","email":"matt@twobitfool.com"},"license":"MIT","scripts":{"build":"rollup -i index.esm.js -o index.cjs.js -f cjs","test":"mocha -r esm","prepublish":"yarn build"},"devDependencies":{"chai":"^3.5.0","esm":"^3.0.36","mocha":"^3.3.0","rollup":"^0.59.1"},"licenseText":"MIT License\n\nCopyright (c) 2018 Matt Smith\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"stifle@1.1.0","dist":{"shasum":"1680b5de9de04074164f4ac0fe7d34db6b6f7229","size":2300,"noattachment":false,"key":"/stifle/-/stifle-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stifle/download/stifle-1.1.0.tgz"},"maintainers":[{"name":"twobitfool","email":"matt@twobitfool.com"}],"_npmUser":{"name":"twobitfool","email":"matt@twobitfool.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stifle_1.1.0_1528136972175_0.5412490504433369"},"_hasShrinkwrap":false,"publish_time":1528136973401,"_cnpm_publish_time":1528136973401,"_cnpmcore_publish_time":"2021-12-16T11:29:14.531Z"},"1.0.4":{"name":"stifle","version":"1.0.4","description":"A very simple way to throttle a function","main":"index.js","repository":{"type":"git","url":"git+https://github.com/twobitfool/stifle.git"},"author":{"name":"Matt Smith","email":"matt@twobitfool.com"},"license":"MIT","scripts":{"test":"mocha"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.3.0"},"gitHead":"d5d870e001a11b2516f3163432a74eb2e290b79c","bugs":{"url":"https://github.com/twobitfool/stifle/issues"},"homepage":"https://github.com/twobitfool/stifle#readme","_id":"stifle@1.0.4","_shasum":"8b3bcdf52419b0a9c79e35adadce50123c1d8e99","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"twobitfool","email":"matt@twobitfool.com"},"dist":{"shasum":"8b3bcdf52419b0a9c79e35adadce50123c1d8e99","size":5653,"noattachment":false,"key":"/stifle/-/stifle-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/stifle/download/stifle-1.0.4.tgz"},"maintainers":[{"name":"twobitfool","email":"matt@twobitfool.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stifle-1.0.4.tgz_1517425935762_0.9460354999173433"},"directories":{},"publish_time":1517425936834,"_hasShrinkwrap":false,"_cnpm_publish_time":1517425936834,"_cnpmcore_publish_time":"2021-12-16T11:29:14.761Z"},"1.0.2":{"name":"stifle","version":"1.0.2","description":"A very simple way to throttle a function","main":"index.js","repository":{"type":"git","url":"git+https://github.com/twobitfool/stifle.git"},"author":{"name":"Matt Smith","email":"matt@twobitfool.com"},"license":"MIT","scripts":{"test":"mocha"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.3.0"},"gitHead":"e7543f6ea2c5955eca54d84f934cab74576dc5df","bugs":{"url":"https://github.com/twobitfool/stifle/issues"},"homepage":"https://github.com/twobitfool/stifle#readme","_id":"stifle@1.0.2","_shasum":"41b6945e3668b28877dade43188efe2ece86ae7b","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"twobitfool","email":"matt@twobitfool.com"},"dist":{"shasum":"41b6945e3668b28877dade43188efe2ece86ae7b","size":5539,"noattachment":false,"key":"/stifle/-/stifle-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/stifle/download/stifle-1.0.2.tgz"},"maintainers":[{"name":"twobitfool","email":"matt@twobitfool.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stifle-1.0.2.tgz_1517422095131_0.3559961109422147"},"directories":{},"publish_time":1517422095992,"_hasShrinkwrap":false,"_cnpm_publish_time":1517422095992,"_cnpmcore_publish_time":"2021-12-16T11:29:14.982Z"},"1.0.1":{"name":"stifle","version":"1.0.1","description":"A very simple way to throttle a function","main":"index.js","repository":{"type":"git","url":"git+https://github.com/twobitfool/stifle.git"},"author":{"name":"Matt Smith","email":"matt@twobitfool.com"},"license":"MIT","scripts":{"test":"mocha"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.3.0"},"gitHead":"3c6fdd75d2b88bec2753b818842c58d12377f9d9","bugs":{"url":"https://github.com/twobitfool/stifle/issues"},"homepage":"https://github.com/twobitfool/stifle#readme","_id":"stifle@1.0.1","_shasum":"440aaccdfa47399cbb38865f7d105d2132110920","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"twobitfool","email":"matt@twobitfool.com"},"dist":{"shasum":"440aaccdfa47399cbb38865f7d105d2132110920","size":5539,"noattachment":false,"key":"/stifle/-/stifle-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stifle/download/stifle-1.0.1.tgz"},"maintainers":[{"name":"twobitfool","email":"matt@twobitfool.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stifle-1.0.1.tgz_1517421654912_0.6799036455340683"},"directories":{},"publish_time":1517421656662,"_hasShrinkwrap":false,"_cnpm_publish_time":1517421656662,"_cnpmcore_publish_time":"2021-12-16T11:29:15.191Z"},"1.0.0":{"name":"stifle","version":"1.0.0","description":"A very simple way to throttle a function","main":"index.js","repository":{"type":"git","url":"git+https://bitbucket.org/twobitfool/stifle.git"},"author":{"name":"Matt Smith","email":"matt@twobitfool.com"},"license":"MIT","scripts":{"test":"mocha"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.3.0"},"gitHead":"597b057b90499c5c32fde7c9667b174c6a0aa2d2","homepage":"https://bitbucket.org/twobitfool/stifle#readme","_id":"stifle@1.0.0","_shasum":"759b522fa59563dd7f1e1c6e9f3793bda8556843","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"twobitfool","email":"matt@twobitfool.com"},"dist":{"shasum":"759b522fa59563dd7f1e1c6e9f3793bda8556843","size":5542,"noattachment":false,"key":"/stifle/-/stifle-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stifle/download/stifle-1.0.0.tgz"},"maintainers":[{"name":"twobitfool","email":"matt@twobitfool.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stifle-1.0.0.tgz_1517420695258_0.5527650914154947"},"directories":{},"publish_time":1517420696244,"_hasShrinkwrap":false,"_cnpm_publish_time":1517420696244,"_cnpmcore_publish_time":"2021-12-16T11:29:15.409Z"}},"readme":"stifle\n======\n\nWrap a function, so it is only called (at most) once every X milliseconds.\n\n```javascript\n    var stifle = require('stifle')\n\n    // A silly little clock\n    function tellTime () {\n      console.log('The time is now ' + new Date())\n    }\n\n    // Only show the time once per second\n    var secondHand = stifle(tellTime, 1000)\n\n    // Call it like crazy, but it will only fire once per second\n    var interval = setInterval(secondHand, 10)\n```\n\n## Cancellation\n\nThe wrapped function comes with a `cancel` method to kill any pending future invocations -- useful for shutting it down when a page or component is being unloaded.\n\n\n```javascript\n    // Stop calling the secondHand\n    clearInterval(interval)\n\n    // Cancel pending calls, or else it will fire one more time\n    secondHand.cancel()\n```\n\n## No Extras\n\nTo keep it fast and simple, `stifle` does not support:\n* passing parameters\n* returning values\n* recursive invocation\n* \"flushing\" pending invocations\n* leading/trailing options\n\nIf you want those fancy features, check out [lodash.throttle](https://lodash.com/docs/4.17.4#throttle)\n\n","_attachments":{},"homepage":"https://github.com/twobitfool/stifle#readme","bugs":{"url":"https://github.com/twobitfool/stifle/issues"},"license":"MIT"}