{"_id":"call-limit","_rev":"10-91f5919ad95e4f3fcd7a2b0580df3970","name":"call-limit","description":"Limit the number of simultaneous calls to an async function","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"call-limit","version":"1.0.0","description":"Limit the number of simultaneous calls to an async function","main":"index.js","scripts":{"prepublish":"babel call-limit.js --out-dir es5","test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/iarna/call-limit.git"},"author":{"name":"Rebecca Turner","email":"me@re-becca.org"},"license":"ISC","bugs":{"url":"https://github.com/iarna/call-limit/issues"},"homepage":"https://npmjs.com/packages/call-limit","dependencies":{},"devDependencies":{"babel":"^5.0.2","tap":"^1.0.0"},"engine":{"node":">=0.10.x"},"gitHead":"827896d15813c9022bd0ead96000e0b2910f6020","_id":"call-limit@1.0.0","_shasum":"3cb4bbe7875b4f2267d8ec83ff51c762fdb4d292","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.3","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"3cb4bbe7875b4f2267d8ec83ff51c762fdb4d292","tarball":"https://registry.npmjs.org/call-limit/-/call-limit-1.0.0.tgz","integrity":"sha512-AjP9EOom97iHGZrR6n85+EQJLnjG10K0sL/HJMADtxF0tNDeb98aSpomAEfpGPCIbVqe4TzaQI37lGN/vCgG6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGC7eGfwdexEVHTP0o94ZJfWa+GQYF1hBItd/1aCu8JcAiAf6w/yOTTztEwt0hKU3egJJ9YufIf94jpcxkTDhmuTsw=="}]},"maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"directories":{}},"1.0.1":{"name":"call-limit","version":"1.0.1","description":"Limit the number of simultaneous calls to an async function","main":"index.js","scripts":{"prepublish":"babel call-limit.js --out-dir es5","test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/iarna/call-limit.git"},"author":{"name":"Rebecca Turner","email":"me@re-becca.org"},"license":"ISC","bugs":{"url":"https://github.com/iarna/call-limit/issues"},"homepage":"https://npmjs.com/packages/call-limit","dependencies":{},"devDependencies":{"babel":"^5.0.2","tap":"^1.0.0"},"engine":{"node":">=0.10.x"},"gitHead":"3d8953e6080d2d1f3a08989df9889afd46b57299","_id":"call-limit@1.0.1","_shasum":"3d4770098b4ea40be364e8c62c7b45b28e7bcc20","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.3","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"3d4770098b4ea40be364e8c62c7b45b28e7bcc20","tarball":"https://registry.npmjs.org/call-limit/-/call-limit-1.0.1.tgz","integrity":"sha512-WQcMF+1KmZJBkX4h4Knw3Dv46UM8gJN4LuayqMkJZGPLPEctAAOVMWfbG9PgBLtlaS6dycUHCkKzL0CQO4H5aQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiaFTH5ai5dB+EX8K7HgVHW40rNYbxxORjmKCAFHFxxgIgBbb2UpAtMvTd/l/4TQbUvGwIfiIvNoGzRAEZOycGM2o="}]},"maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"directories":{}},"1.0.2":{"name":"call-limit","version":"1.0.2","description":"Limit the number of simultaneous calls to an async function","main":"index.js","scripts":{"prepublish":"babel call-limit.js --out-dir es5","test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/iarna/call-limit.git"},"author":{"name":"Rebecca Turner","email":"me@re-becca.org"},"license":"ISC","bugs":{"url":"https://github.com/iarna/call-limit/issues"},"homepage":"https://npmjs.com/packages/call-limit","dependencies":{},"devDependencies":{"babel":"^5.0.2","tap":"^1.0.0"},"engine":{"node":">=0.10.x"},"gitHead":"4c3baa002c691696004b1db2c7073efced30d8fb","_id":"call-limit@1.0.2","_shasum":"e79197c590540ff574d74d47aeb480cf6f61588b","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"e79197c590540ff574d74d47aeb480cf6f61588b","tarball":"https://registry.npmjs.org/call-limit/-/call-limit-1.0.2.tgz","integrity":"sha512-SNR9vFiIUE9Sf41s61VejHsGP5taeONZOyezYx0jc55farBMztc4vXpyhwtFbfvUSlzvCx0lc8Vj2qy2MVyu8w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICHyt13VXtaU9cFAM1SpQ8W+l/GGFHJ3aIr34tAobnGpAiAR63HolFJ4Wd5S4RHBGm3NyrJmKmiuXTiWg6ygOy4Afg=="}]},"maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"directories":{}},"1.0.3":{"name":"call-limit","version":"1.0.3","description":"Limit the number of simultaneous calls to an async function","main":"index.js","scripts":{"prepublish":"babel call-limit.js --out-dir es5","test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/iarna/call-limit.git"},"author":{"name":"Rebecca Turner","email":"me@re-becca.org"},"license":"ISC","bugs":{"url":"https://github.com/iarna/call-limit/issues"},"homepage":"https://npmjs.com/packages/call-limit","dependencies":{},"devDependencies":{"babel":"^5.0.2","tap":"^1.0.0"},"engine":{"node":">=0.10.x"},"gitHead":"15149704fdefd35bb66eb99188f32db0476078a9","_id":"call-limit@1.0.3","_shasum":"e0bd97382e4d13cc30a1863a1e0faa347226e1aa","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"e0bd97382e4d13cc30a1863a1e0faa347226e1aa","tarball":"https://registry.npmjs.org/call-limit/-/call-limit-1.0.3.tgz","integrity":"sha512-0mEL4UYNNuLtukr5M27awSckJzIQF3xaLqHfUmDinuRWZDtkS20iiuD3P62mn9K49jrPgE0r+Gsm7fgX7wMPeA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWKc6rFtaEKL7iSA24g2beA5DTBv8ZRRyg+UGzTGEB1QIhANRkHsF8hm3ehWns4c/FV3SQJoMuQvPmvQVKkLi0mxt4"}]},"maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"directories":{}},"1.1.0":{"name":"call-limit","version":"1.1.0","description":"Limit the number of simultaneous calls to an async function","main":"call-limit.js","scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/iarna/call-limit.git"},"author":{"name":"Rebecca Turner","email":"me@re-becca.org"},"license":"ISC","bugs":{"url":"https://github.com/iarna/call-limit/issues"},"homepage":"https://npmjs.com/packages/call-limit","dependencies":{},"devDependencies":{"tap":"^1.0.0"},"files":["call-limit.js"],"gitHead":"2b05fe72f0cf33a2aac951cd68dd949fccb0d9e9","_id":"call-limit@1.1.0","_shasum":"6fd61b03f3da42a2cd0ec2b60f02bd0e71991fea","_from":".","_npmVersion":"4.4.1","_nodeVersion":"7.7.1","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"6fd61b03f3da42a2cd0ec2b60f02bd0e71991fea","tarball":"https://registry.npmjs.org/call-limit/-/call-limit-1.1.0.tgz","integrity":"sha512-2waS4t+GBOSXb5hZyPRjo1m2ndtQUwMj1rIYa3XnLnFlfd5uNnxo3nyPQF+i7yDpgz95ed9Ga6hpgVXi+0oMeA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2yVLxdrDjdEBqPfo2fYnYdUafsqXjVpTMhP2jaN75TwIhAKpTv6ifS9wrzM2uPUyjA80fFzuUzrFJieUs/CEmEw7v"}]},"maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/call-limit-1.1.0.tgz_1488849297527_0.29955350141972303"},"directories":{}},"1.1.1":{"name":"call-limit","version":"1.1.1","description":"Limit the number of simultaneous calls to an async function","main":"call-limit.js","scripts":{"test":"tap test/*.js","prerelease":"npm t","release":"standard-version -s","postrelease":"npm publish && git push --follow-tags","pretest":"iarna-standard","update-coc":"weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'","update-contrib":"weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"},"repository":{"type":"git","url":"git+https://github.com/iarna/call-limit.git"},"author":{"name":"Rebecca Turner","email":"me@re-becca.org"},"license":"ISC","bugs":{"url":"https://github.com/iarna/call-limit/issues"},"homepage":"https://npmjs.com/packages/call-limit","dependencies":{},"devDependencies":{"tap":"^14.2.0","weallbehave":"*","weallcontribute":"*","@iarna/standard":"*","standard-version":"*"},"gitHead":"17de3ec82fdf84a6db6ff52f45f00cd7f5c67f8d","_id":"call-limit@1.1.1","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"integrity":"sha512-5twvci5b9eRBw2wCfPtN0GmlR2/gadZqyFpPhOK6CvMFoFgA+USnZ6Jpu1lhG9h85pQ3Ouil3PfXWRD4EUaRiQ==","shasum":"ef15f2670db3f1992557e2d965abc459e6e358d4","tarball":"https://registry.npmjs.org/call-limit/-/call-limit-1.1.1.tgz","fileCount":5,"unpackedSize":7401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9JI/CRA9TVsSAnZWagAAUcsP/RR6mzEqU6GJAXXOqEOC\nhjmxJjRk4f+tdncLUjL6r9g5dg1wYe0sdqSWkefhNbsYtAKtiLY56xb8ZJKf\neOHFJH2atwfX94/lfMV5d+Am5oFJd62LhB6xAkZldWSl+CMGRBedL/ggXanr\nTrPmPpLACbvOPFIKFQSiC14KHaBtw/aovEYLYkj5DI5Q+Qoj6IvACVsknHtC\nIRUtJhFsIYp6pFnxCLOzbK6Q9KYeUC4DyyDKuVd6UZ+9GB4fhNmkghQs/gnv\n7R63xxq30fZDa/y3zHEz1DdufeMLWGsXLoj/mLRI3C8DmxBz8CnQEK3XO6/2\nOlzR9E86p4c31JKLXrFOjrM9nsevh6j8zak6V5ydIFVYoOrwiyk6dHYO5+bL\nZpjdrp+g5lUXWGiqeQml6OLwZcdGga16ZvXeNtEexxNUUWTgd9keQwND/9mf\n6GwPxJNu+NGAr9OVUDnTNKOXM9h7OgbeBuiLDLW3st+it7CxqFTQUOuzyI8b\nXOCaosavTCvXahdFgdg6Ggc+UPFDd4Km5S6CkuNkamBfrjVohr6jnKh9mZ5C\nNMySp6V/dCQXmb/Ql/BP1iMXBDC1eu4GBVuJ/pEyt0mrOJpu2CX7cskkfWzX\nXbWphpvT1AgsF5SqDXcO+su5G3ZxLahm5jhKWFddgPUe4jIPKFyKLAoHCUCR\nQQzA\r\n=13Sy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFw06xExXzH4SDDV5IVFVtqZ9d5ayQ8K2svrz1KacWyAiBKoqW5asG9wwjXJ9b/d+xLkZbCtcs6kI633wAEiEUPIg=="}]},"maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/call-limit_1.1.1_1559532095089_0.14005293387908035"},"_hasShrinkwrap":false}},"readme":"call-limit\n----------\n\nLimit the number of simultaneous executions of a async function.\n\n```javascript\nconst fs = require('fs')\nconst limit = require('call-limit')\nconst limitedStat = limit(fs.stat, 5)\n```\n\nOr with promise returning functions:\n\n```javascript\nconst fs = Bluebird.promisifyAll(require('fs'))\nconst limit = require('call-limit')\nconst limitedStat = limit.promise(fs.statAsync, 5)\n```\n\n### USAGE:\n\nGiven that:\n\n```javascript\nconst limit = require('call-limit')\n```\n\n### limit(func, maxRunning) → limitedFunc\n\nThe returned function will execute up to maxRunning calls of `func` at once. \nBeyond that they get queued and called when the previous call completes.\n\n`func` must accept a callback as the final argument and must call it when\nit completes, or `call-limit` won't know to dequeue the next thing to run.\n\nBy contrast, callers to `limitedFunc` do NOT have to pass in a callback, but\nif they do they'll be called when `func` calls its callback.\n\n### limit.promise(func, maxRunning) → limitedFunc\n\nThe returned function will execute up to maxRunning calls of `func` at once.\nBeyond that they get queued and called when the previous call completes.\n\n`func` must return a promise.\n\n`limitedFunc` will return a promise that resolves with the promise returned\nfrom the call to `func`.\n\n### limit.method(class, methodName, maxRunning)\n\nThis is sugar for:\n\n```javascript\nclass.prototype.methodName = limit(class.prototype.methodName, maxRunning)\n```\n\n### limit.method(object, methodName, maxRunning)\n\nThis is sugar for:\n\n```javascript\nobject.methodName = limit(object.methodName, maxRunning)\n```\n\nFor example `limit.promise.method(fs, 'stat', 5)` is the same as\n`fs.stat = limit.promise(fs.stat, 5)`.\n\n### limit.promise.method(class, methodName, maxRunning)\n\nThis is sugar for:\n\n```javascript\nclass.prototype.methodName = limit.promise(class.prototype.methodName, maxRunning)\n```\n\n### limit.promise.method(object, methodName, maxRunning)\n\nThis is sugar for:\n\n```javascript\nobject.methodName = limit.promise(object.methodName, maxRunning)\n```\n\nFor example `limit.promise.method(fs, 'statAsync', 5)` is the same as\n`fs.statAsync = limit.promise(fs.statAsync, 5)`.\n","maintainers":[{"name":"iarna","email":"me@re-becca.org"}],"time":{"modified":"2022-06-13T05:26:00.464Z","created":"2015-07-20T07:19:40.394Z","1.0.0":"2015-07-20T07:19:40.394Z","1.0.1":"2015-07-21T18:41:58.858Z","1.0.2":"2015-09-17T23:53:28.929Z","1.0.3":"2015-09-18T17:11:03.817Z","1.1.0":"2017-03-07T01:14:57.803Z","1.1.1":"2019-06-03T03:21:35.208Z"},"homepage":"https://npmjs.com/packages/call-limit","repository":{"type":"git","url":"git+https://github.com/iarna/call-limit.git"},"author":{"name":"Rebecca Turner","email":"me@re-becca.org"},"bugs":{"url":"https://github.com/iarna/call-limit/issues"},"license":"ISC","readmeFilename":"README.md","users":{"iarna":true}}