{"_id":"promise-limit","_rev":"19-5160bb44304f53e5c2661e00acfb09e9","name":"promise-limit","description":"limits calls to functions that return promises","dist-tags":{"latest":"2.7.0"},"versions":{"1.0.0":{"name":"promise-limit","version":"1.0.0","description":"limits calls to functions that return promises","main":"index.js","dependencies":{},"devDependencies":{"chai":"3.5.0","fs-promise":"0.5.0","lowscore":"1.8.0","mocha":"2.4.5"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/featurist/promise-limit.git"},"keywords":["limit","promise","semaphore"],"author":{"name":"Tim Macfarlane","email":"timmacfarlane@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/featurist/promise-limit/issues"},"homepage":"https://github.com/featurist/promise-limit#readme","gitHead":"3b482a8d54599a4d9ee482e90d4c1fe4753eee1d","_id":"promise-limit@1.0.0","_shasum":"d2604fb14d570e235de5ced14c3625cd5af71bc7","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.5.0","_npmUser":{"name":"refractalize","email":"timmacfarlane@gmail.com"},"maintainers":[{"name":"refractalize","email":"timmacfarlane@gmail.com"}],"dist":{"shasum":"d2604fb14d570e235de5ced14c3625cd5af71bc7","tarball":"https://registry.npmjs.org/promise-limit/-/promise-limit-1.0.0.tgz","integrity":"sha512-k1DiXQwrnTTjgW7NlNofyouCb0JfYC7SA40BlE7DtgaWJokJcQvIpcVOj+ze9GFePUpTCk/yVdVOs+K8K1A18A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPEu1QNSsBiWdMTu3IyUNDc+xv94vbWrqXrUTT7Q66PQIgYWHtgGHvKMjqMFtUkTmvVXEfaeIlnc0f6QEXYKiYZOc="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-limit-1.0.0.tgz_1458819622504_0.10280872089788318"},"directories":{}},"2.0.0":{"name":"promise-limit","version":"2.0.0","description":"limits calls to functions that return promises","main":"index.js","dependencies":{},"devDependencies":{"chai":"3.5.0","fs-promise":"0.5.0","lowscore":"1.8.0","mocha":"2.4.5","standard":"^6.0.8"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+https://github.com/featurist/promise-limit.git"},"keywords":["limit","promise","semaphore"],"author":{"name":"Tim Macfarlane","email":"timmacfarlane@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/featurist/promise-limit/issues"},"homepage":"https://github.com/featurist/promise-limit#readme","gitHead":"ace613ab937714f8e33000b82f360cb12b98cf57","_id":"promise-limit@2.0.0","_shasum":"71a6c274ca7660bc08d1a8518e53f562ce061004","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.1","_npmUser":{"name":"refractalize","email":"timmacfarlane@gmail.com"},"maintainers":[{"name":"refractalize","email":"timmacfarlane@gmail.com"}],"dist":{"shasum":"71a6c274ca7660bc08d1a8518e53f562ce061004","tarball":"https://registry.npmjs.org/promise-limit/-/promise-limit-2.0.0.tgz","integrity":"sha512-MtLMrhZdIA6IVAhweaieGWDSb4dLcZSHjT0TfETb9eXM/VDCbEVaIFv+ekIqv0eUSRhm0M4uFW5EUdMqj4v+Eg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZhej2fFf0+y7xg2SHwdzhhEeUcl8fO7h0BtBqfh2k/wIhANoFqTGAvm/F7TlvSLO2nbSAaNcQby6G0cfFc/TfmTRX"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-limit-2.0.0.tgz_1459495955896_0.750589307397604"},"directories":{}},"2.1.0":{"name":"promise-limit","version":"2.1.0","description":"limits calls to functions that return promises","main":"index.js","dependencies":{},"devDependencies":{"chai":"3.5.0","fs-promise":"0.5.0","lowscore":"1.8.0","mocha":"2.4.5","standard":"^6.0.8"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+https://github.com/featurist/promise-limit.git"},"keywords":["limit","promise","semaphore"],"author":{"name":"Tim Macfarlane","email":"timmacfarlane@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/featurist/promise-limit/issues"},"homepage":"https://github.com/featurist/promise-limit#readme","gitHead":"3cd560842139b38feae0070a199d36b7f305eee1","_id":"promise-limit@2.1.0","_shasum":"9f55b1558909998308daf7a100171443c17d297a","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.0","_npmUser":{"name":"refractalize","email":"timmacfarlane@gmail.com"},"maintainers":[{"name":"refractalize","email":"timmacfarlane@gmail.com"}],"dist":{"shasum":"9f55b1558909998308daf7a100171443c17d297a","tarball":"https://registry.npmjs.org/promise-limit/-/promise-limit-2.1.0.tgz","integrity":"sha512-tfWYY7+jTpPTnptdyh3VuDDEefg3eGV6r1LWMj0fXsZty00l1WAsHzkY7SLB+qkSfBgjbrX5K7rE+t7AgmbB5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxNIKdjiRhf9cKMUQdXTXs1Y/Cb2YazlgRo5GPHMDrwQIhAISGhJkWUh0GStC3nDelnJS1tJRdCyJ6LFrP4nuqDr4Y"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-limit-2.1.0.tgz_1459947126212_0.5846277801319957"},"directories":{}},"2.1.1":{"name":"promise-limit","version":"2.1.1","description":"limits calls to functions that return promises","main":"index.js","dependencies":{},"devDependencies":{"chai":"3.5.0","fs-promise":"0.5.0","lowscore":"1.8.0","mocha":"2.4.5","standard":"^6.0.8"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+https://github.com/featurist/promise-limit.git"},"keywords":["limit","promise","semaphore"],"author":{"name":"Tim Macfarlane","email":"timmacfarlane@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/featurist/promise-limit/issues"},"homepage":"https://github.com/featurist/promise-limit#readme","gitHead":"374b620da0bfc648ae153ca261183ad423e1d812","_id":"promise-limit@2.1.1","_shasum":"a56cdafab2540faa0d1bda2d013dae5a3b4ab21e","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.0","_npmUser":{"name":"refractalize","email":"timmacfarlane@gmail.com"},"maintainers":[{"name":"refractalize","email":"timmacfarlane@gmail.com"}],"dist":{"shasum":"a56cdafab2540faa0d1bda2d013dae5a3b4ab21e","tarball":"https://registry.npmjs.org/promise-limit/-/promise-limit-2.1.1.tgz","integrity":"sha512-C2kTWWWbOvZNLrLieUL3FIrRVSgV0ewLAkskhNfDZgGOM92e5qddKkBgzRLAg56XqCvNXZwWr7rgTtcWS3aQQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCu4kqauX3mSP/oVwWXCR7P1rX9mL/OMg5OBQp15r+ljgIhAJFbq2rEbDhD/kJoJwzQNVQqTb9mFdoFmJYDyyzJxl4q"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-limit-2.1.1.tgz_1459947376768_0.896309805335477"},"directories":{}},"2.2.0":{"name":"promise-limit","version":"2.2.0","description":"limits calls to functions that return promises","main":"index.js","dependencies":{},"devDependencies":{"chai":"3.5.0","chai-as-promised":"5.3.0","fs-promise":"0.5.0","lowscore":"1.8.0","mocha":"2.4.5","standard":"^6.0.8"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+https://github.com/featurist/promise-limit.git"},"keywords":["limit","promise","semaphore"],"author":{"name":"Tim Macfarlane","email":"timmacfarlane@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/featurist/promise-limit/issues"},"homepage":"https://github.com/featurist/promise-limit#readme","gitHead":"da3e0761082d2cc1425cf66160c14c215d39552b","_id":"promise-limit@2.2.0","_shasum":"fe04f21dd891ea7d42b8720012ce185c998720e1","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.0","_npmUser":{"name":"refractalize","email":"timmacfarlane@gmail.com"},"maintainers":[{"name":"refractalize","email":"timmacfarlane@gmail.com"}],"dist":{"shasum":"fe04f21dd891ea7d42b8720012ce185c998720e1","tarball":"https://registry.npmjs.org/promise-limit/-/promise-limit-2.2.0.tgz","integrity":"sha512-8vopqIyoce/K9AyM9O7cWAYcaBEUxbYj8B5qbzAO3wAlYLShuyzclhj4hSBTCmLgwN5VHXlm0Ysy0h1ZeF2PoQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLhiJjubdQt3JWLVl3UZVGQAIf8zmMxOA5WuKq8yxf1QIgJt0MzF2io3yWfeoMlcgXiaJMD/JhiERGPwiRvGRqITo="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-limit-2.2.0.tgz_1464772982723_0.07371493033133447"},"directories":{}},"2.3.0":{"name":"promise-limit","version":"2.3.0","description":"limits calls to functions that return promises","main":"index.js","dependencies":{},"devDependencies":{"chai":"3.5.0","chai-as-promised":"5.3.0","fs-promise":"0.5.0","lowscore":"1.8.0","mocha":"2.4.5","standard":"^6.0.8"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+https://github.com/featurist/promise-limit.git"},"keywords":["limit","promise","semaphore"],"author":{"name":"Tim Macfarlane","email":"timmacfarlane@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/featurist/promise-limit/issues"},"homepage":"https://github.com/featurist/promise-limit#readme","gitHead":"1c86b830b43c896fd410d2597f58f738a281a336","_id":"promise-limit@2.3.0","_shasum":"5b0fed39e709248a31f04ae1c856b8214f89d5ce","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"refractalize","email":"timmacfarlane@gmail.com"},"maintainers":[{"name":"refractalize","email":"timmacfarlane@gmail.com"}],"dist":{"shasum":"5b0fed39e709248a31f04ae1c856b8214f89d5ce","tarball":"https://registry.npmjs.org/promise-limit/-/promise-limit-2.3.0.tgz","integrity":"sha512-V1z8YTaiPd4UOuR3tQOEUocsbza4AM1z37BksM3T9DvyTFNKgL/pmGRQbT3OUDLVv9l8reuBUhLApPr1r9OAJw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsTY79jvfd5cXb6qsbr2WcJp1ML6DWdHig9tbLYBh0cgIgUqUKyGhpx2mhYRV5534exnFxSkr9qo6NkhvFBeCIzgw="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/promise-limit-2.3.0.tgz_1474298682029_0.1344622103497386"},"directories":{}},"2.4.0":{"name":"promise-limit","version":"2.4.0","description":"limits calls to functions that return promises","main":"index.js","dependencies":{},"devDependencies":{"chai":"3.5.0","chai-as-promised":"5.3.0","fs-promise":"0.5.0","lowscore":"1.8.0","mocha":"2.4.5","standard":"10.0.2"},"scripts":{"test":"standard && mocha"},"repository":{"type":"git","url":"git+https://github.com/featurist/promise-limit.git"},"keywords":["limit","promise","semaphore"],"author":{"name":"Tim Macfarlane","email":"timmacfarlane@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/featurist/promise-limit/issues"},"homepage":"https://github.com/featurist/promise-limit#readme","gitHead":"9ebd6ae019826a27decc7893ae0a99ed0ec3513b","_id":"promise-limit@2.4.0","_shasum":"a05e997723f4fc13efab676f11fa0a299587edf2","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"refractalize","email":"timmacfarlane@gmail.com"},"dist":{"shasum":"a05e997723f4fc13efab676f11fa0a299587edf2","tarball":"https://registry.npmjs.org/promise-limit/-/promise-limit-2.4.0.tgz","integrity":"sha512-h3QQdoSWFvUTo8B/9JsrxobNjRFTaA7xcmNinlCgA4flOQQeFtoeF80shjUmxYbnXc9zpmtHxf0AiL1GtTcH1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCON3TFpjJSwiJcmYIVarQj/IAxGC6vOA93UgncNfOt5AIgbGILqaz+XDqinliskaAPgepdUKnTjdivuYg2SxJcCHg="}]},"maintainers":[{"name":"refractalize","email":"timmacfarlane@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/promise-limit-2.4.0.tgz_1493018566205_0.6814184037502855"},"directories":{}},"2.5.0":{"name":"promise-limit","version":"2.5.0","description":"limits calls to functions that return promises","main":"index.js","dependencies":{},"devDependencies":{"chai":"3.5.0","chai-as-promised":"5.3.0","eslint":"4.3.0","eslint-config-standard":"10.2.1","eslint-plugin-es5":"1.1.0","eslint-plugin-import":"2.7.0","eslint-plugin-node":"5.1.1","eslint-plugin-promise":"3.5.0","eslint-plugin-standard":"3.0.1","fs-promise":"0.5.0","lowscore":"1.8.0","mocha":"2.4.5"},"scripts":{"test":"mocha && eslint ."},"repository":{"type":"git","url":"git+https://github.com/featurist/promise-limit.git"},"keywords":["limit","promise","semaphore"],"author":{"name":"Tim Macfarlane","email":"timmacfarlane@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/featurist/promise-limit/issues"},"homepage":"https://github.com/featurist/promise-limit#readme","gitHead":"54bcb001bb0a7c9772c8e571c30850dd36a08581","_id":"promise-limit@2.5.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.3","_npmUser":{"name":"refractalize","email":"timmacfarlane@gmail.com"},"dist":{"integrity":"sha512-rcM2P2gwKlGBxARVAl8yewVv01rJwV/nwHg9a+onduvaOagiqfZJe3esOWspD5/5adyQs1b4ZYwQcZoSfuZGKQ==","shasum":"5ea5751c943b97d64cba999e8c81a04eba57e7d4","tarball":"https://registry.npmjs.org/promise-limit/-/promise-limit-2.5.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEAYeiK5/XAehwxEpKeIwDx4tgIyLffP58UyYQcl8vhPAiB1A+R0D4y8JI/LF/e6Qn33hA34t6GQAP3hZYTMI8VnFQ=="}]},"maintainers":[{"name":"refractalize","email":"timmacfarlane@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-limit-2.5.0.tgz_1501000140631_0.9236292345449328"},"directories":{}},"2.6.0":{"name":"promise-limit","version":"2.6.0","description":"limits calls to functions that return promises","main":"index.js","dependencies":{},"devDependencies":{"chai":"3.5.0","chai-as-promised":"5.3.0","eslint":"4.3.0","eslint-config-standard":"10.2.1","eslint-plugin-es5":"1.1.0","eslint-plugin-import":"2.7.0","eslint-plugin-node":"5.1.1","eslint-plugin-promise":"3.5.0","eslint-plugin-standard":"3.0.1","fs-promise":"0.5.0","lowscore":"1.8.0","mocha":"2.4.5"},"scripts":{"test":"mocha && eslint ."},"repository":{"type":"git","url":"git+https://github.com/featurist/promise-limit.git"},"keywords":["limit","promise","semaphore"],"author":{"name":"Tim Macfarlane","email":"timmacfarlane@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/featurist/promise-limit/issues"},"homepage":"https://github.com/featurist/promise-limit#readme","gitHead":"6db90ddc1bc98a09c4bc56ecace30c966d05ca46","_id":"promise-limit@2.6.0","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"refractalize","email":"timmacfarlane@gmail.com"},"dist":{"integrity":"sha512-ZyUYT6/nrx7oDInu6Go128Ck4N2aXqpV8G0QyU3ugGS0PRPOf5Y7v0IF0yZW2pwZCGtHzBftKievNj8491suJw==","shasum":"cb6959fcfdd0ee6ec694ec58b2b3b856ca52ffed","tarball":"https://registry.npmjs.org/promise-limit/-/promise-limit-2.6.0.tgz","fileCount":10,"unpackedSize":16461,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdChzbmB0rm5FCAEjO+T+X09GUJvGCjXXkcgMsz8c3PgIhAOaa3omyQjO8Ac7Gmyi+V5jgBXf0Gqw++9Q4uRklwaVZ"}]},"maintainers":[{"name":"refractalize","email":"timmacfarlane@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-limit_2.6.0_1519720251840_0.7109673549530506"},"_hasShrinkwrap":false},"2.7.0":{"name":"promise-limit","version":"2.7.0","description":"limits calls to functions that return promises","main":"index.js","dependencies":{},"devDependencies":{"chai":"4.1.2","chai-as-promised":"7.1.1","eslint":"*","eslint-config-standard":"11.0.0","eslint-plugin-es5":"1.3.1","eslint-plugin-import":"*","eslint-plugin-node":"7.0.1","eslint-plugin-promise":"3.8.0","eslint-plugin-standard":"3.1.0","fs-promise":"2.0.3","lowscore":"1.17.0","mocha":"*"},"scripts":{"test":"mocha && eslint ."},"repository":{"type":"git","url":"git+https://github.com/featurist/promise-limit.git"},"keywords":["limit","promise","semaphore"],"author":{"name":"Tim Macfarlane","email":"timmacfarlane@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/featurist/promise-limit/issues"},"homepage":"https://github.com/featurist/promise-limit#readme","gitHead":"5b911ce33253ec0a7ea9cf079d8c0434efbe3244","_id":"promise-limit@2.7.0","_npmVersion":"6.1.0","_nodeVersion":"10.7.0","_npmUser":{"name":"refractalize","email":"timmacfarlane@gmail.com"},"dist":{"integrity":"sha512-7nJ6v5lnJsXwGprnGXga4wx6d1POjvi5Qmf1ivTRxTjH4Z/9Czja/UCMLVmB9N93GeWOU93XaFaEt6jbuoagNw==","shasum":"eb5737c33342a030eaeaecea9b3d3a93cb592b26","tarball":"https://registry.npmjs.org/promise-limit/-/promise-limit-2.7.0.tgz","fileCount":10,"unpackedSize":16473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbXBHMCRA9TVsSAnZWagAAyUgP/35kM7Ed8s4XIzmMPoRQ\n+Gks4Wds9/9j45MjkDDNK23Rkole8F+qkAcIGTXq3ZmFZSEdg8cNSpEi5RmD\neCRsf22kNXtqe3BSQVR/I/wBxThJvBtmgzYyabr7nvJwalB+ZE9Qf7cD4wSU\nhxCF+KogIBG9wgP3VWjYOhEr+KG5XC/A3NITxUoeS/1RYXBVRx+PV9NxyOl2\nMENw7R2fOvXhrFjjpcyZ42vvEkR2LARV8rd6hpFfEBgvu8vPoguTQ4/CZ8gG\n+vqzwQQSXmNZym8l7SJIjOT0u6Xi8fX5O0rvo0aqGpS24I5YR8vH9n0Elubj\nyp2ltllBguUhG+V/A6Zfmxs7EwMropI3vO5ek4Oy5FpsgOx4HKAXuyaDK4xf\nWCifXEbYLrzl+DIR9lPV0ZdZ2NR81dd+eVpun3C4z/2+MRliypKzQt5RdTir\nJXjmkoogmatsv9kxidHOVNNZmpqXyEKQgotemE+6BsODv2va8OtYmIre2XX/\nhoPLw65jQicuAv+Vyq6UY8ox4bt2mVYJoqPiObtZFEd0ZSjLq+b6WuYIP5K7\n9evt8Ag+P3gwrsuhHA5N77I0mgT4lVgk3F6/YE+poB8j1DhP/NfsJd0/17b0\nMKbqVKdhMcOfJ2TRjuXuTbisNDKXkwpcOw+IjaKlZEB9JYejeceip0l9wczl\nQWHY\r\n=y6Ar\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF1WtCUzwB4DWHUgbc2C3mlqWAizHDp5+ENMAinKUuhJAiEAxBOrqnmzGoIGUBnWhWeGt+rDw6zutWoAEEBahWwufck="}]},"maintainers":[{"name":"refractalize","email":"timmacfarlane@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-limit_2.7.0_1532760524474_0.29388360871507957"},"_hasShrinkwrap":false}},"readme":"promise-limit  [![npm version](https://img.shields.io/npm/v/promise-limit.svg)](https://www.npmjs.com/package/promise-limit) [![npm](https://img.shields.io/npm/dm/promise-limit.svg)](https://www.npmjs.com/package/promise-limit) [![Build Status](https://travis-ci.org/featurist/promise-limit.svg?branch=master)](https://travis-ci.org/featurist/promise-limit)\n===\n\nLimit outstanding calls to promise returning functions, or a semaphore for promises. You might want to do this to reduce load on external services, or reduce memory usage when processing large batches of jobs.\n\n```sh\nnpm install promise-limit\n```\n\n```js\nvar promiseLimit = require('promise-limit')\n\nvar limit = promiseLimit(2)\n\nvar jobs = ['a', 'b', 'c', 'd', 'e']\n\nPromise.all(jobs.map((name) => {\n  return limit(() => job(name))\n})).then(results => {\n  console.log()\n  console.log('results:', results)\n})\n\nfunction job (name) {\n  var text = `job ${name}`\n  console.log('started', text)\n\n  return new Promise(function (resolve) {\n    setTimeout(() => {\n      console.log('       ', text, 'finished')\n      resolve(text)\n    }, 100)\n  })\n}\n```\n\nwill output:\n\n```\nstarted job a\nstarted job b\n        job a finished\n        job b finished\nstarted job c\nstarted job d\n        job c finished\n        job d finished\nstarted job e\n        job e finished\n\nresults: [ 'job a', 'job b', 'job c', 'job d', 'job e' ]\n```\n\nAPI\n---\n\n```js\nvar promiseLimit = require('promise-limit')\n\npromiseLimit(concurrency?: Number) -> limit\n```\n\nReturns a function that can be used to wrap promise returning functions, limiting them to `concurrency` outstanding calls.\n\n- `concurrency` the concurrency, i.e. 1 will limit calls to one at a time, effectively in sequence or serial. 2 will allow two at a time, etc. 0 or `undefined` specify no limit, and all calls will be run in parallel.\n\nlimit\n=====\n\n```js\nlimit(fn: () -> Promise<T>) -> Promise<T>\n```\n\nA function that limits calls to `fn`, based on `concurrency` above. Returns a promise that resolves or rejects the same value or error as `fn`. All functions are executed in the same order in which they were passed to `limit`. `fn` must return a promise.\n\n* `fn` a function that is called with no arguments and returns a promise. You can pass arguments to your function by putting it inside another function, i.e. `() -> myfunc(a, b, c)`.\n\nlimit.map\n=========\n\n```js\nlimit.map(items: [T], mapper: (T) -> Promise<R>) -> Promise<[R]>\n```\n\nMaps an array of items using `mapper`, but limiting the number of concurrent calls to `mapper` with the `concurrency` of `limit`. If at least one call to `mapper` returns a rejected promise, the result of `map` is a the same rejected promise, and no further calls to `mapper` are made.\n\nlimit.queue\n===========\n\n```js\nlimit.queue: Number\n```\n\nReturns the queue length, the number of jobs that are waiting to be started. You could use this to throttle incoming jobs, so the queue doesn't overwhealm the available memory - for e.g. `pause()` a stream.\n\n## We're Hiring!\nFeaturist provides full stack, feature driven development teams. Want to join us? Check out [our career opportunities](https://www.featurist.co.uk/careers/).\n","maintainers":[{"name":"refractalize","email":"timmacfarlane@gmail.com"}],"time":{"modified":"2022-06-24T18:48:31.652Z","created":"2016-03-24T11:40:24.809Z","1.0.0":"2016-03-24T11:40:24.809Z","2.0.0":"2016-04-01T07:32:38.328Z","2.1.0":"2016-04-06T12:52:08.730Z","2.1.1":"2016-04-06T12:56:18.798Z","2.2.0":"2016-06-01T09:23:05.202Z","2.3.0":"2016-09-19T15:24:43.748Z","2.4.0":"2017-04-24T07:22:46.871Z","2.5.0":"2017-07-25T16:29:01.475Z","2.6.0":"2018-02-27T08:30:51.932Z","2.7.0":"2018-07-28T06:48:44.571Z"},"homepage":"https://github.com/featurist/promise-limit#readme","keywords":["limit","promise","semaphore"],"repository":{"type":"git","url":"git+https://github.com/featurist/promise-limit.git"},"author":{"name":"Tim Macfarlane","email":"timmacfarlane@gmail.com"},"bugs":{"url":"https://github.com/featurist/promise-limit/issues"},"license":"ISC","readmeFilename":"README.md","users":{"mraxus":true,"shyling":true,"isayme":true,"sebestyen":true}}