{"_id":"promise-batcher","_rev":"9-875759bcf40b5536ced3c4dc5642120a","name":"promise-batcher","description":"A module for batching individual promises to improve their collective efficiency.","dist-tags":{"latest":"1.1.1"},"versions":{"0.1.0":{"name":"promise-batcher","version":"0.1.0","description":"A module for batching individual promises to improve their collective efficiency.","keywords":["batching","promise","promises","concurrency","es6","async","await","queue"],"bugs":{"url":"https://github.com/baudzilla/promise-batcher/issues","email":"baudzila@gmail.com"},"author":{"name":"Wes van Vugt","email":"baudzila@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/baudzilla/promise-batcher.git"},"scripts":{"build":"npm run clean && npm run tslint && npm run tsc","clean":"rm -rf index.js index.d.ts test","test":"mocha test/*.js --reporter spec --colors","test-debug":"cross-env DEBUG=promise-batcher npm test","tsc":"tsc -p ts","tslint":"tslint ts/**/*.ts"},"main":"index.js","typings":"index.d.ts","engines":{"node":">=4.0.0"},"dependencies":{"debug":"^3.1.0"},"devDependencies":{"@types/chai-as-promised":"^7.1.0","@types/debug":"0.0.29","@types/mocha":"^2.2.43","@types/node":"^6.0.88","chai":"^4.1.2","chai-as-promised":"^7.1.1","cross-env":"^5.0.5","mocha":"^3.5.3","tslint":"^5.7.0","typescript":"^2.5.3"},"license":"MIT","public":true,"homepage":"https://github.com/baudzilla/promise-batcher#readme","_id":"promise-batcher@0.1.0","_npmVersion":"5.4.2","_nodeVersion":"6.11.0","_npmUser":{"name":"baudzilla","email":"baudzila@gmail.com"},"dist":{"integrity":"sha512-AgocDcoikgcLQIPgJBKxanvPIe8r8/sD6ej8FnvfJSrEoaVGfhT6+MtmYf2IMia0l1nnKKexaXHJA4cSlTE90Q==","shasum":"7c6e2d8bfd32c96bba9189a4cc45a3b40781e080","tarball":"https://registry.npmjs.org/promise-batcher/-/promise-batcher-0.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC4F/JI5uss3W9mA/BcRAN+qx71bSAtCCnHv6OrrkPMqAiEAyzrPXdOoXrBDCzeq+t453D7zNXxmgFsIxKlQVlBSwk0="}]},"maintainers":[{"name":"baudzilla","email":"baudzila@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-batcher-0.1.0.tgz_1506579990646_0.42038663080893457"},"directories":{}},"0.1.1":{"name":"promise-batcher","version":"0.1.1","description":"A module for batching individual promises to improve their collective efficiency.","keywords":["batching","promise","promises","concurrency","es6","async","await","queue"],"bugs":{"url":"https://github.com/baudzilla/promise-batcher/issues","email":"baudzila@gmail.com"},"author":{"name":"Wes van Vugt","email":"baudzila@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/baudzilla/promise-batcher.git"},"scripts":{"build":"npm run clean && npm run tslint && npm run tsc","clean":"rm -rf index.js index.d.ts test","test":"mocha test/*.js --reporter spec --colors","test-debug":"cross-env DEBUG=promise-batcher* npm test","tsc":"tsc -p ts","tslint":"tslint ts/**/*.ts"},"main":"index.js","typings":"index.d.ts","engines":{"node":">=4.0.0"},"dependencies":{"debug":"^3.1.0"},"devDependencies":{"@types/chai-as-promised":"^7.1.0","@types/debug":"^0.0.30","@types/mocha":"^2.2.43","@types/node":"^6.0.88","chai":"^4.1.2","chai-as-promised":"^7.1.1","cross-env":"^5.0.5","mocha":"^4.0.1","tslint":"^5.7.0","typescript":"^2.5.3"},"license":"MIT","public":true,"gitHead":"5aa46d3d0ebbe662c1aa4db240685820b4f6f5e3","homepage":"https://github.com/baudzilla/promise-batcher#readme","_id":"promise-batcher@0.1.1","_npmVersion":"5.4.2","_nodeVersion":"8.6.0","_npmUser":{"name":"baudzilla","email":"baudzila@gmail.com"},"dist":{"integrity":"sha512-18B2p5qHJyYgx6b39Ugp9Fx6LwF6LfFvFemjpyHzDLJte4bRw9Dfd5bHOQ7gokgHtACUOgX5KGzfP9xt8b8FhA==","shasum":"0b3e88ebbcbc853e9ec7996f8428da64fba8b328","tarball":"https://registry.npmjs.org/promise-batcher/-/promise-batcher-0.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/yBgHKenhx9tlKJxaFNM+j6AnauQCkho+KMyKLrFpeAIgMLompfFMD/xyfaNza1FQiv1V5RyK349s3hE/gahLpg0="}]},"maintainers":[{"name":"baudzilla","email":"baudzila@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-batcher-0.1.1.tgz_1507789774928_0.8589006636757404"},"directories":{}},"1.0.0":{"name":"promise-batcher","version":"1.0.0","description":"A module for batching individual promises to improve their collective efficiency.","keywords":["batching","promise","promises","concurrency","es6","async","await","queue"],"bugs":{"url":"https://github.com/baudzilla/promise-batcher/issues","email":"baudzila@gmail.com"},"author":{"name":"Wes van Vugt","email":"baudzila@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/baudzilla/promise-batcher.git"},"scripts":{"prepublish":"npm run build","build":"npm run clean && npm run tslint && npm run tsc","clean":"rm -rf index.js index.d.ts test","test":"mocha test/*.js --reporter spec --colors","test-debug":"cross-env DEBUG=promise-batcher* npm test","tsc":"tsc","tslint":"tslint ts/**/*.ts"},"main":"index.js","typings":"index.d.ts","engines":{"node":">=4.0.0"},"dependencies":{"debug":"^3.1.0","defer-promise":"^1.0.1"},"devDependencies":{"@types/chai-as-promised":"^7.1.0","@types/debug":"^0.0.30","@types/mocha":"^2.2.45","@types/node":"^8.5.2","chai":"^4.1.2","chai-as-promised":"^7.1.1","cross-env":"^5.1.3","mocha":"^4.0.1","tslint":"^5.8.0","typescript":"^2.6.2"},"license":"MIT","public":true,"gitHead":"e0108830e9f4daf4cf31eb4cc69029c73ab7b050","homepage":"https://github.com/baudzilla/promise-batcher#readme","_id":"promise-batcher@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.6.0","_npmUser":{"name":"baudzilla","email":"baudzila@gmail.com"},"dist":{"integrity":"sha512-PlFtmzD/b7SgGMAivjVEFyGv+ZmRFIo5mrAmNt5dOMRW7aDHq4f473TtIO/JfgvSxkZx9/vrC5BxTEHL7QQ5NQ==","shasum":"3897a09f6b729c4b42ee178b5c6cdbb945dd1a1b","tarball":"https://registry.npmjs.org/promise-batcher/-/promise-batcher-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmh6BaiSKSnN7UsJ77Bwrs+ARcQY5qk2rZR7sEDvPoMQIhAI8W0GPUHeEdooR1vbfkHv5RsJBrkgtg23NwGuKKEGvC"}]},"maintainers":[{"name":"baudzilla","email":"baudzila@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-batcher-1.0.0.tgz_1514336299929_0.4204338206909597"},"directories":{}},"1.0.1":{"name":"promise-batcher","version":"1.0.1","description":"A module for batching individual promises to improve their collective efficiency.","keywords":["batching","promise","promises","concurrency","es6","async","await","queue"],"bugs":{"url":"https://github.com/baudzilla/promise-batcher/issues","email":"baudzila@gmail.com"},"author":{"name":"Wes van Vugt","email":"baudzila@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/baudzilla/promise-batcher.git"},"scripts":{"prepare":"npm run build","build":"npm run clean && npm run tslint && npm run tsc","clean":"rm -rf index.js index.d.ts test","test":"mocha test/*.js --reporter spec --colors","test-debug":"cross-env DEBUG=promise-batcher* npm test","tsc":"tsc","tslint":"tslint ts/**/*.ts"},"main":"index.js","typings":"index.d.ts","engines":{"node":">=4.0.0"},"dependencies":{"debug":"^3.1.0","p-defer":"^1.0.0"},"devDependencies":{"@types/chai-as-promised":"^7.1.0","@types/debug":"^0.0.30","@types/mocha":"^5.2.0","@types/node":"^9.6.6","chai":"^4.1.2","chai-as-promised":"^7.1.1","cross-env":"^5.1.3","mocha":"^5.1.1","tslint":"^5.8.0","typescript":"^2.6.2"},"license":"MIT","public":true,"gitHead":"36d2f4630e56de4d62e7faded9ec7480504f9c4e","homepage":"https://github.com/baudzilla/promise-batcher#readme","_id":"promise-batcher@1.0.1","_npmVersion":"5.8.0","_nodeVersion":"8.6.0","_npmUser":{"name":"baudzilla","email":"baudzila@gmail.com"},"dist":{"integrity":"sha512-pQngyWJjGewna0x74+OC7UiMoKBXb4PLa2NRolo6PQgJJ4zJ+xMKnvaDSQm6t4LR9jDHuhHd/Akq4bbtpnGGzQ==","shasum":"904b5dc091c85e5c16bbfcd4c5c1b0885155c129","tarball":"https://registry.npmjs.org/promise-batcher/-/promise-batcher-1.0.1.tgz","fileCount":6,"unpackedSize":20335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2YEBCRA9TVsSAnZWagAANkMP/i9cJZKN128DM0l2qMej\nGWSTsYmCd9OupTtIcnHant4bHBsUZmfybKlFtIYVlKeP5OUGQN5kpjTXXvMs\nvVMGIhfoox/tkiwJ9MEV3PuqIVmsaGNUw43hVlvbtcdgKRVauRPeOp/fJVIv\nUw4VgwY8TTq2WKUb9m0Am1Mb6ArhEU0nfADocJ6EwbD2PSkIa3t9/iUQZu6G\nepLzSUevtfyfPxjsejkm09GJgpXCnsGPAbjMBYCVhiNs3Rl9ZyLcXPT1uTNe\nw11zJO4dX5EXuK6SuILcoWtm5f8Xxx6MRgoSlKoOiyqx6pOKCv5+tKMhgyv/\nxwOGzcHtrOE453tu1HM+G++N1z2NNdxTTD5DUB4Ml+jH5BQG4NEC8S2mZFnH\nFU6F1nYG+KR6eXIy0Kk0cOZpipsruQRLG4vfa2U353sEhwrUCHrOAVU/N0Ko\n8E3canTlre8lOqZIirm6pNoOKlDYvy8kgM074Cfrdka4+yzeHwi1s2snNW+Q\nXG4ZUk1O/Xza9SGV2epdsI/wkQ0QWxzNP2JRZ0V1Kq1M87zUy4j6ABjt3bBu\nGxuElFO/bBYXIH1JoTLQHiKfXJm7GJfwG2ZAkiJO3WQCahWcA9ezuTCMStXB\nuIalwr9EPGtei/jWI3RzFojfxj+LG2vFfX7bIjM0rFWMe38okdZzVQJGCxbw\nZrz6\r\n=J6JO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWnGRwC8lyqPQmysJhuS8LgCeUeKGu0nus/fJAD6R9egIgaHjxhxwVxa3w6DFLj1WrzTtJmCN/Au7Dx9+ljL91n70="}]},"maintainers":[{"name":"baudzilla","email":"baudzila@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-batcher_1.0.1_1524203777178_0.5856405186632745"},"_hasShrinkwrap":false},"1.0.2":{"name":"promise-batcher","version":"1.0.2","description":"A module for batching individual promises to improve their collective efficiency.","keywords":["batching","promise","promises","concurrency","es6","async","await","queue"],"author":{"name":"Wes van Vugt","email":"wes.vanvugt@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/WesVanVugt/promise-batcher.git"},"scripts":{"prepare":"npm run build","build":"npm run clean && tsc","clean":"rm -rf index.js index.d.ts *.tgz","test":"npm run lint && nyc mocha --require ts-node/register ts/test/*.ts --colors","test-package":"npm pack && cd test-package && npm i && npm test","test-debug":"cross-env DEBUG=promise-batcher* npm test","lint":"tslint ts/**/*.ts"},"main":"index.js","typings":"index.d.ts","engines":{"node":">=4.0.0"},"dependencies":{"debug":"^4.1.1","p-defer":"^1.0.0"},"devDependencies":{"@types/chai-as-promised":"^7.1.0","@types/debug":"^4.1.0","@types/mocha":"^5.2.5","@types/node":"^10.12.24","@types/p-defer":"^1.0.3","@types/promise-polyfill":"6.0.1","@types/time-span":"^2.0.0","chai":"^4.2.0","chai-as-promised":"^7.1.1","cross-env":"^5.2.0","mocha":"^5.2.0","nyc":"^13.2.0","promise-polyfill":"8.1.0","time-span":"^2.0.0","ts-node":"^8.0.2","tslint":"^5.12.1","typescript":"^3.3.3"},"license":"MIT","nyc":{"extension":[".ts"]},"gitHead":"81093edd2b8e9a881a20de9c3747f5836fd739bc","bugs":{"url":"https://github.com/WesVanVugt/promise-batcher/issues"},"homepage":"https://github.com/WesVanVugt/promise-batcher#readme","_id":"promise-batcher@1.0.2","_npmVersion":"6.5.0","_nodeVersion":"10.14.2","_npmUser":{"name":"wesvanvugt","email":"wes.vanvugt@gmail.com"},"dist":{"integrity":"sha512-rIy53dWwsEKb7ps3Phbr+CkSe++AZ5gjXKKUiZNln06GpHKSqH1RafdffSPtN9d9FxxgRgMC6zO3w7JYjZR/ew==","shasum":"3765ee214d7520bb29acd2ef4f334df88be03295","tarball":"https://registry.npmjs.org/promise-batcher/-/promise-batcher-1.0.2.tgz","fileCount":6,"unpackedSize":20528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYnYmCRA9TVsSAnZWagAAArYP/1yHdvUdo4pqplOZ9UhJ\nW8tmRcSIotQb7B49grCZSSyrSL6PYjAPTXBas7xlf3p0e2U/DwDAs3L2f27m\n5fLvosu5ORhkG9R9IXm3z1DlCVVTu3Gc8kWy9nEKzMYEzui47BTpme/x7tau\ny3f9p/RErgsIgR3TNUB6tGxV8JmCvRq14+1hl8I3Qb//kdemVmB6b+P4ntu1\nSFFuSSxeKhk9uhZhqUP/SIV909VuYEF6zgoDRObw8jU5O0gXFaFMUJrkXV63\nD0G/2EI537CjAUPGe/yzVfHeKAZ1GcOJyUai9Xfq5otu3fx3TRHuz41Ra/OU\nwbl/EmYTUdbz41hANVw5akS6hKqJAo0g4bDpY92X0rBvgNScftqX+zypsh9L\nlbn/kIcV0gyiTxyVdxWwU9aFaMaI2L87Xrzm9FlH9rfaY2w3Yl1emo/cI6gi\nfNXFfeLPl9GAP97DCF3HaSAyBuiz9wK4UhVprfsrmfWiPWcKV0AeR3L7Pplr\nQcA3/ra60JNTrYxH6Trqk9i3ZvvmdSNGKOoSvvpl9es31zQiW0UFib9DE2b8\nmNIxjXYEP1+A4azOsTTIY0NYS//Xq18Bw7d0dsYRV0mtWKYZdIdh1IbykNdZ\n6z9plIKk3D0NpLLMR9gZ3GCO+Z95C0LAAewKWBv9/ntzla9UM9kuhR+fhqYV\noLsn\r\n=oRRl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC18SWUVwkQ7eLYfLH7nXYdlKCYDabM1P+RHgK2F3Hb/gIgdTr3Q7Ovpl0jxAn0V/QhZcC2rUEfKiCl3RtK4/2JCAo="}]},"maintainers":[{"email":"wes.vanvugt@gmail.com","name":"wesvanvugt"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-batcher_1.0.2_1549956645922_0.3822116383203382"},"_hasShrinkwrap":false},"1.0.3":{"name":"promise-batcher","version":"1.0.3","description":"A module for batching individual promises to improve their collective efficiency.","keywords":["batching","promise","promises","concurrency","es6","async","await","queue"],"author":{"name":"Wes van Vugt","email":"wes.vanvugt@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/WesVanVugt/promise-batcher.git"},"scripts":{"prepare":"npm run clean && tsc","clean":"rm -rf index.js index.d.ts *.tgz","test":"npm run lint && npm run test-local && npm run test-package","test-local":"nyc mocha --colors --require ts-node/register ts/test/*.test.ts","test-package":"bash test-package.sh","test-debug":"cross-env NODE_DEBUG=promise-batcher npm run test-local","lint":"eslint --color --max-warnings 0 --ext .ts ."},"main":"index.js","typings":"index.d.ts","engines":{"node":">=8"},"dependencies":{"p-defer":"^3.0.0"},"devDependencies":{"@sinonjs/fake-timers":"^7.1.2","@types/chai-as-promised":"^7.1.4","@types/mocha":"^8.2.2","@types/node":"^14.17.4","@types/promise-polyfill":"^6.0.3","@types/sinonjs__fake-timers":"^6.0.2","@typescript-eslint/eslint-plugin":"^4.28.2","@typescript-eslint/parser":"^4.28.2","chai":"^4.3.4","chai-as-promised":"^7.1.1","cross-env":"^7.0.3","eslint":"^7.30.0","eslint-plugin-prettier":"^3.4.0","mocha":"^9.0.2","nyc":"^15.1.0","prettier":"^2.3.2","promise-polyfill":"^8.2.0","time-span":"^4.0.0","ts-expect":"^1.3.0","ts-node":"^10.0.0","typescript":"^4.3.5"},"license":"MIT","nyc":{"extension":[".ts"]},"gitHead":"ee6764417d10471e6d1be5df88cde0820790c33a","bugs":{"url":"https://github.com/WesVanVugt/promise-batcher/issues"},"homepage":"https://github.com/WesVanVugt/promise-batcher#readme","_id":"promise-batcher@1.0.3","_nodeVersion":"14.16.0","_npmVersion":"7.19.1","dist":{"integrity":"sha512-ZgrE/AzFP2ic4qPcExgL1zxHunPNaNdr9rFlFl4+ixbbLfsLYsi9DumCP1fph/hs4wetUYHWkQnRLwWgZEOUgA==","shasum":"4841bca9cd4f93203c06f73cd19da10689235282","tarball":"https://registry.npmjs.org/promise-batcher/-/promise-batcher-1.0.3.tgz","fileCount":5,"unpackedSize":20894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5AEbCRA9TVsSAnZWagAAK7QP/0lIMffyLFQrgvhN5DsZ\nLMIJDAqHmaHKcMYqAkcALRYIexB09hMflWUiDoiHMvgzVDhXkSgw/Z4xM6ro\nZHbAA7jacbFFx86muvb69xvpYY+Avv3af6w/ePy1uC/pThDWQkqN8KDVPdm2\nzr6riTKdodPzuhVTusObOW6kZ0YJu12E1yBV6EFg8l15AKs/QRGHqQvev2zz\nBXtUcenau8+OyKSS3HrLIb+5KBFEwRisqpBt6VWzIket9yUbD+33hbMu22Xb\nGj1vIfm2T9vP58iq3JOwCmSdGib62oKr8UjE4PhdAMW+IQUyjuSLYS0l+323\n6sy4yfDrG7Lv1P2jI23vqsBl4sf7dJ8Wp2M+1aSAmfNWUViMuO3khkkVfAzF\nwaahmFSSpXvnC0uAekRWgW33euj9bFilyA0dQYsNY959gHDt91jLz2atgoaK\n5MTbGWdG4RjzAamtWIbcaDbmk24bX6P5OaL4HD2+z9XEgjDb9P2eyEL4UE2+\nY8C/cz/VmSK2R94BzlAMCTMak8ug/skMdAkOFjY9uEn8PHQiOVGO3BgsgbQ3\nRlnQ4vkFn79Xf+pN68+6XsBro7EYXGhUDD9Cqv3EILbhV1bcpfgMH9cKugIG\nLHew2AYfeGfzTUWI501x8OoqbJbtDdKSJ9mnojCqntZeho/pIT1DFGlRfYdM\nNMZ3\r\n=mmDo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF34PyT/HBpSGKmANC2fnkZe0INhfEDNUcfcz+QochJ4AiEA8gC/Kd1iCSnIrXKTu2dIGIveqaLl7i20agiUkqgj6+M="}]},"_npmUser":{"name":"wesvanvugt","email":"wes.vanvugt@gmail.com"},"directories":{},"maintainers":[{"name":"wesvanvugt","email":"wes.vanvugt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-batcher_1.0.3_1625555226757_0.7972557775618296"},"_hasShrinkwrap":false},"1.1.0":{"name":"promise-batcher","version":"1.1.0","description":"A module for batching individual promises to improve their collective efficiency.","keywords":["batching","promise","promises","concurrency","es6","async","await","queue"],"author":{"name":"Wes van Vugt","email":"wes.vanvugt@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/WesVanVugt/promise-batcher.git"},"scripts":{"prepare":"npm run clean && tsc && tsc -p ./tsconfig.nocomments.json","clean":"rm -rf index.js index.d.ts *.tgz","test":"npm run lint && npm run test:local && npm run test:package","test:local":"nyc mocha --colors --require ts-node/register ts/test/*.test.ts","test:package":"bash test-package.sh","test:debug":"cross-env NODE_DEBUG=promise-batcher npm run test:local","lint":"eslint --color --max-warnings 0 --ext .ts ."},"main":"index.js","typings":"index.d.ts","engines":{"node":">=8"},"dependencies":{"p-defer":"^3.0.0"},"devDependencies":{"@sinonjs/fake-timers":"^7.1.2","@types/chai-as-promised":"^7.1.4","@types/mocha":"^8.2.2","@types/node":"^14.17.4","@types/promise-polyfill":"^6.0.3","@types/sinonjs__fake-timers":"^6.0.2","@typescript-eslint/eslint-plugin":"^4.28.2","@typescript-eslint/parser":"^4.28.2","chai":"^4.3.4","chai-as-promised":"^7.1.1","cross-env":"^7.0.3","eslint":"^7.30.0","eslint-plugin-prettier":"^3.4.0","mocha":"^9.0.2","nyc":"^15.1.0","prettier":"^2.3.2","promise-polyfill":"^8.2.0","time-span":"^4.0.0","ts-expect":"^1.3.0","ts-node":"^10.0.0","typescript":"^4.3.5"},"sideEffects":false,"license":"MIT","gitHead":"93361107fe011497ea299107e78abe860d824c92","bugs":{"url":"https://github.com/WesVanVugt/promise-batcher/issues"},"homepage":"https://github.com/WesVanVugt/promise-batcher#readme","_id":"promise-batcher@1.1.0","_nodeVersion":"14.16.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Q/+G7i1ZqRCx56s9W1RRjhK6xveb2UkZz4Lt6xksO3SjcglDrRrQ4YRQ4WtalOFCzUNiAhstLLOX31QJRmr/BA==","shasum":"99f74d8d8c58f925b2cfb169f1e774eaaa9f4d19","tarball":"https://registry.npmjs.org/promise-batcher/-/promise-batcher-1.1.0.tgz","fileCount":6,"unpackedSize":21009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5USjCRA9TVsSAnZWagAABgMP/0F+jxCMRGGMYne7CNhm\nY+2iDxb0hRzquQ6VB5nNvyYbYZ5PA0cFhta/Viat45dM3zq4O/4SA7Iti6jd\n7Z4yweT8VYEP9dJw55G246nunX/AGTB9912kRQS26JuVz9RWYsh3C7i+CNtV\nYN7WUOgvQNBDgp0DgyD7NkvtSK1cQKDKRSA0Ew9K072gH0zpXyf5wrPemm5v\nokK1r3N/66ww+D4cggWMnvipw0q4fgjzHSWUZMor/f0gkIwdWxZtDxOPmjqU\nKRlo6KSpu/btOvvQch3s5lggyxh5ru6ur8tEQzpIOY9qTm3DRAY+Yh0eeGi4\ngwTuZKpDse5f4U3FL7+NwLh1pbVdy2OZ+EggoGNuz/8V2Gy1v0ZUWii4RfoL\nbzhwrIN+sDEsvaNFkekvjYasTQ8nlURVvFtDt2GBtunBXrM6SpaI9KDYVuyt\nGWB/lt/DV8oDW+64lFq2gzw+lsgshb/FqTu8T8I6ArZzVMEX+N4/btAYSHOC\nPSAMR/GopmaU7OGGmTfkTOUiMly4vWcFfDp8/bjQWx1GCbjDZiDL9+xD7N0y\n3n+oLqI9Q/SIxrutT7dD2PZ0ueOpgsE9GC91q+4AmpzrD2xvoNwQnHVOJwYX\nfDgukRla7Td9Qre/fQ2Ddunk0s3mzdxOgwqbceqg2YR/wHQVAE/GBy+dPm7r\n7V12\r\n=Y73z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDC3BAf1U74ozhoX4zXmOeCUndsg4gy7l7+5DhXJGxpewIgatWEtyFdStNNnR2Y+W9XpjvlAt+acdCg6yO48ezTqRQ="}]},"_npmUser":{"name":"wesvanvugt","email":"wes.vanvugt@gmail.com"},"directories":{},"maintainers":[{"name":"wesvanvugt","email":"wes.vanvugt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-batcher_1.1.0_1625638051035_0.0907987505477017"},"_hasShrinkwrap":false},"1.1.1":{"name":"promise-batcher","version":"1.1.1","description":"A module for batching individual promises to improve their collective efficiency.","keywords":["batching","promise","promises","concurrency","es6","async","await","queue"],"author":{"name":"Wes van Vugt","email":"wes.vanvugt@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/WesVanVugt/promise-batcher.git"},"scripts":{"prepare":"npm run clean && tsc -p ./tsconfig.build.json && tsc -p ./tsconfig.nocomments.json && prettier -w index.js index.d.ts","clean":"rm -rf index.js index.d.ts *.tgz","test":"npm run lint && npm run test:local && npm run test:package","test:local":"jest --color","test:package":"bash test-package.sh","test:debug":"cross-env NODE_DEBUG=promise-batcher npm run test:local","lint":"eslint --color --max-warnings 0 --ext .ts ."},"main":"index.js","typings":"index.d.ts","engines":{"node":">=8"},"dependencies":{"p-defer":"^3.0.0"},"devDependencies":{"@tsconfig/node12":"^1.0.11","@types/eslint":"^8.4.10","@types/jest":"^29.2.5","@types/node":"^18.11.18","@types/promise-polyfill":"^6.0.4","@typescript-eslint/eslint-plugin":"^5.48.1","@typescript-eslint/parser":"^5.48.1","cross-env":"^7.0.3","eslint":"^8.31.0","eslint-plugin-prettier":"^4.2.1","jest":"^29.3.1","prettier":"^2.8.2","promise-polyfill":"^8.2.3","time-span":"^4.0.0","ts-expect":"^1.3.0","ts-jest":"^29.0.4","typescript":"^4.9.4"},"sideEffects":false,"license":"MIT","gitHead":"2df439985493999c5a6aad36bd2da2a346858858","bugs":{"url":"https://github.com/WesVanVugt/promise-batcher/issues"},"homepage":"https://github.com/WesVanVugt/promise-batcher#readme","_id":"promise-batcher@1.1.1","_nodeVersion":"14.18.3","_npmVersion":"8.19.3","dist":{"integrity":"sha512-DtGBp8OQlAtALDFoVphyAz6Vn1c0GyelKU5smpMQEXpEAcWWxY3fC5JT0AkpWqrljvJrhC6zVdWbK/jx6NNG2A==","shasum":"6510cafad9d5e33aaa63675fae70b61027a30004","tarball":"https://registry.npmjs.org/promise-batcher/-/promise-batcher-1.1.1.tgz","fileCount":5,"unpackedSize":17736,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICwC/b+z7LqNlCYKCdQPqaAqaTin2xqU22QhWJ78PScOAiB82NoQs6vc55celIWEKb9OqRHETQGmfl/y6ZbOhTK3rw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjx4JEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoYHQ//coyLqszZIvPqxaAbrRXMywZW56Ysw+GL9h0fe6WnVh8Pd0Wi\r\nJAbqLHLp3IF6aAzXsfDMNKU/W8Sc8eBS+tgXymvWeHu+D+6s8ywANzvPr5Xi\r\nArppWYdFQv65JNMErtx9uRTh6n0OqvR/Ge9IgxW5ZRIpruNNnbmemSMste1/\r\nj+aqeHhvrvBjnDt4o2y5UOKsePUZkeFB+2yJSwzPcJMocPAjdcUQSlt4lqa7\r\nafDr0O7vNdxUuJKSid4JvVdZvriptJ+q5UOlzPsAZi/LTyff1SSgnIGk+PvW\r\nRl2RP+NZlMzsFHbvYCN0x3AelO8qwhZQwKB0O42ssUjWwfWaexSdm8+VYDVp\r\nYrQ9TB1rece/JK1v02NUrHbc/vfPdIJ+BeHrElFTisrD87Kp07kCVAMhcd1V\r\nS6xQ6F5bK+61aEUMGQzw0V9kE6+BQYG5o61q74lUBVNMJm9e/xtkMq8dT2H6\r\n5Fjb3hHZdpkQVL4QJrJ6LsvzCgSFf7ATRjEa1xHBMMIqYn9COO2xNzktzXiG\r\nnpc5PioYdEeYx7EvnMKUU9KAmPtXq6lmeg+h3GmkF32esb2/UZy7G9qELKnP\r\nx7LCobK//PYVuKqpg5Td7qoHTp4/tGemGhDJ6ud1sjBgNWd23BmM2NNfPCPR\r\n4IzdFbP+fBcqkVjePGcnEH8A33a23sfZHF4=\r\n=czUI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"wesvanvugt","email":"wes.vanvugt@gmail.com"},"directories":{},"maintainers":[{"name":"wesvanvugt","email":"wes.vanvugt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-batcher_1.1.1_1674019395880_0.7731621060336578"},"_hasShrinkwrap":false}},"readme":"[![GitHub Workflow](https://github.com/WesVanVugt/promise-batcher/actions/workflows/main.yml/badge.svg)](https://github.com/WesVanVugt/promise-batcher/actions/workflows/main.yml)\n[![Install Size](https://packagephobia.now.sh/badge?p=promise-batcher)](https://packagephobia.now.sh/result?p=promise-batcher)\n\n# promise-batcher\n\nA module for batching individual promises to improve their collective efficiency.\n\nFor release notes, see the [changelog](https://github.com/WesVanVugt/promise-batcher/blob/master/changelog.md).\n\n## Install\n\nnpm install promise-batcher\n\n## Examples\n\nPromise batcher is useful for batching requests made from branching execution paths.\n\n### Basic Example\n\nThis example demonstrates a batcher which takes numbers as inputs, adds 1 to each and returns the result.\nNote that while the getResult function is called multiple times, the batching function is only run once.\nIf the send method is not called, the batch will still be processed when Node.js idles.\n\n```javascript\nconst { Batcher } = require(\"promise-batcher\");\nlet runCount = 0;\nconst batcher = new Batcher({\n  batchingFunction: (nums) => {\n    runCount++;\n    return Promise.resolve(\n      nums.map((n) => {\n        return n + 1;\n      }),\n    );\n  },\n});\n// Send the batch of requests. This step is optional.\nbatcher.send();\nconst inputs = [1, 3, 5, 7];\n// Start a series of individual requests\nconst promises = inputs.map((input) => batcher.getResult(input));\n// Wait for all the requests to complete\nPromise.all(promises).then((results) => {\n  console.log(results); // [ 2, 4, 6, 8 ]\n  // The requests were still done in a single run\n  console.log(runCount); // 1\n});\n```\n\n### Database Example\n\nThis example shows how a batcher could be used to combine individual requests made to a database. This is especially\nuseful when the requests need to be made independently of each other, allowing the requests to be made individually,\nyet be processed as batches. Note that in a real-world example, it would be best to implement exponential backoff for\nretried requests by using a delayFunction.\n\n```javascript\nconst { Batcher, BATCHER_RETRY_TOKEN } = require(\"promise-batcher\");\nconst batcher = new Batcher({\n  batchingFunction: (recordIds) => {\n    // Perform a batched request to the database with the inputs from getResult()\n    return database.batchGet(recordIds).then((results) => {\n      // Interpret the results from the request, returning an array of result values\n      return results.map((result) => {\n        if (result.error) {\n          if (result.error.retryable) {\n            // Retry the individual request (eg. request throttled)\n            return BATCHER_RETRY_TOKEN;\n          } else {\n            // Reject the individual request (eg. record not found)\n            return new Error(result.error.message);\n          }\n        } else {\n          // Resolve the individual request\n          return result.data;\n        }\n      });\n    });\n  },\n});\n// Send the batch of requests. This step is optional.\nbatcher.send();\nconst recordIds = [\"ABC123\", \"DEF456\", \"HIJ789\"];\n// Start a series of individual requests\nconst promises = recordIds.map((recordId) => batcher.getResult(recordId));\n// Wait for all the requests to complete\nPromise.all(promises).then((results) => {\n  // Use the results\n});\n```\n\n## API Reference\n\n### Object: Batcher\n\nA tool for combining requests.\n\n#### Constructor\n\n**new Batcher(options)** - Creates a new batcher.\n\n- options.**batchingFunction**(inputArray) - A function which is passed an array of request values, returning a\n  promise which resolves to an array of response values. The request and response arrays must be of equal length. To\n  reject an individual request, return an Error object (or class which extends Error) at the corresponding element in\n  the response array. To retry an individual request, return the BATCHER_RETRY_TOKEN in the response array.\n- options.**delayFunction**() - A function which can delay a batch by returning a promise which resolves when the\n  batch should be run. If the function does not return a promise, no delay will be applied _(optional)_.\n- options.**maxBatchSize** - The maximum number of requests that can be combined in a single batch _(optional)_.\n- options.**queuingDelay** - The number of milliseconds to wait before running a batch of requests. This is used to\n  allow time for the requests to queue up. Defaults to 1ms. This delay does not apply if the limit set by\n  options.maxBatchSize is reached, or if batcher.send() is called. Note that since the batcher uses setTimeout to\n  perform this delay, batches delayed by this will only be run when Node.js is idle, even if that means a longer delay\n  _(optional)_.\n- options.**queuingThresholds** - An array containing the number of requests that must be queued in order to trigger\n  a batch request at each level of concurrency. For example [1, 5], would require at least 1 queued request when no\n  batch requests are active, and 5 queued requests when 1 (or more) batch requests are active. Defaults to [1]. Note\n  that the delay imposed by options.queuingDelay still applies when a batch request is triggered _(optional)_.\n\n#### Methods\n\n- batcher.**getResult**(input) - Returns a promise which resolves or rejects with the individual result returned from\n  the batching function.\n- batcher.**idlePromise**(input) - Returns a promise which resolves there are no pending batches.\n- batcher.**send**() - Bypasses any queuingDelay set, while respecting all other limits imposed. If no other limits\n  are set, this will result in the batchingFunction being run immediately. Note that batches will still be run even if\n  this function is not called, once the queuingDelay or maxBatchSize is reached.\n\n#### Properties\n\n- batcher.**idling** - `true` when there are no pending batches, and `false` otherwise.\n\n## License\n\n[MIT](https://github.com/WesVanVugt/promise-batcher/blob/master/license)\n","maintainers":[{"name":"wesvanvugt","email":"wes.vanvugt@gmail.com"}],"time":{"modified":"2023-01-18T05:23:16.198Z","created":"2017-09-28T06:26:30.717Z","0.1.0":"2017-09-28T06:26:30.717Z","0.1.1":"2017-10-12T06:29:34.983Z","1.0.0":"2017-12-27T00:58:20.210Z","1.0.1":"2018-04-20T05:56:17.350Z","1.0.2":"2019-02-12T07:30:46.054Z","1.0.3":"2021-07-06T07:07:06.895Z","1.1.0":"2021-07-07T06:07:31.171Z","1.1.1":"2023-01-18T05:23:16.086Z"},"homepage":"https://github.com/WesVanVugt/promise-batcher#readme","keywords":["batching","promise","promises","concurrency","es6","async","await","queue"],"repository":{"type":"git","url":"git+https://github.com/WesVanVugt/promise-batcher.git"},"author":{"name":"Wes van Vugt","email":"wes.vanvugt@gmail.com"},"bugs":{"url":"https://github.com/WesVanVugt/promise-batcher/issues"},"license":"MIT","readmeFilename":"readme.md"}