{"_id":"middleware-flow","_rev":"327098","name":"middleware-flow","description":"Middleware control flow library: series, parallel, or, and","dist-tags":{"latest":"0.8.0"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"time":{"modified":"2021-06-07T02:44:59.000Z","created":"2014-03-09T04:50:22.488Z","0.8.0":"2015-05-10T19:26:01.105Z","0.7.0":"2015-04-21T20:13:32.063Z","0.6.1":"2014-10-14T22:07:58.997Z","0.6.0":"2014-09-04T18:13:07.812Z","0.5.1":"2014-07-15T22:16:46.873Z","0.5.0":"2014-07-08T20:57:17.674Z","0.4.1":"2014-06-04T01:13:38.286Z","0.4.0":"2014-05-18T20:59:03.756Z","0.3.1":"2014-05-12T07:03:45.259Z","0.3.0":"2014-05-12T07:01:37.739Z","0.2.1":"2014-04-29T02:32:53.164Z","0.2.0":"2014-03-09T06:49:21.981Z","0.1.2":"2014-03-09T05:09:19.760Z","0.1.1":"2014-03-09T04:52:36.980Z","0.1.0":"2014-03-09T04:50:22.488Z"},"users":{"jrthib":true,"ssljivic":true},"author":{"name":"Tejesh Mehta"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"versions":{"0.8.0":{"name":"middleware-flow","version":"0.8.0","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"lab -a code -l -c test","test-watch":"nodemon --exec npm test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"contributors":[{"name":"Bryan Kendall","email":"bryan@bryankendall.com"}],"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"101":"^0.16.1","callback-count":"0.0.3"},"devDependencies":{"code":"^1.4.0","express":"~3.5.0","lab":"^5.6.0","nodemon":"^1.3.7","supertest":"^0.9.0"},"gitHead":"f51ec34a11aba1bafc8f29e3980306b36c0fa02c","_id":"middleware-flow@0.8.0","_shasum":"6d37377c6dfc2d3360e9f339138a8b71bb7ecb3b","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tjmehta","email":"tj_mehta@hotmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"dist":{"shasum":"6d37377c6dfc2d3360e9f339138a8b71bb7ecb3b","size":7249,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.8.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.8.0.tgz"},"publish_time":1431285961105,"_cnpm_publish_time":1431285961105,"_hasShrinkwrap":false},"0.7.0":{"name":"middleware-flow","version":"0.7.0","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"lab -l -c test","test-watch":"nodemon --exec npm test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"contributors":[{"name":"Bryan Kendall","email":"bryan@bryankendall.com"}],"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"101":"^0.16.1","callback-count":"0.0.3"},"devDependencies":{"supertest":"^0.9.0","express":"~3.5.0","lab":"^3.1.1"},"gitHead":"3926242a18778267c01df77241a24d05a5918491","_id":"middleware-flow@0.7.0","_shasum":"f96d9ba9e3d67e2adb9d5b1749345356c14b79f2","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"tjmehta","email":"tejesh.mehta@gmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"dist":{"shasum":"f96d9ba9e3d67e2adb9d5b1749345356c14b79f2","size":6879,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.7.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.7.0.tgz"},"publish_time":1429647212063,"_cnpm_publish_time":1429647212063,"_hasShrinkwrap":false},"0.6.1":{"name":"middleware-flow","version":"0.6.1","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"lab -l -c test","test-watch":"nodemon --exec npm test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"contributors":[{"name":"Bryan Kendall","email":"bryan@bryankendall.com"}],"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"101":"^0.6.0","callback-count":"0.0.3"},"devDependencies":{"supertest":"^0.9.0","express":"~3.5.0","lab":"^3.1.1"},"_id":"middleware-flow@0.6.1","_shasum":"139440fda7b9eee36ba93542b093c418f2344a7c","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"tjmehta","email":"tejesh.mehta@gmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"dist":{"shasum":"139440fda7b9eee36ba93542b093c418f2344a7c","size":6552,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.6.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.6.1.tgz"},"publish_time":1413324478997,"_cnpm_publish_time":1413324478997,"_hasShrinkwrap":false},"0.6.0":{"name":"middleware-flow","version":"0.6.0","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"lab -l -c test","test-watch":"nodemon --exec npm test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"contributors":[{"name":"Bryan Kendall","email":"bryan@bryankendall.com"}],"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"101":"^0.6.0","callback-count":"0.0.3"},"devDependencies":{"supertest":"^0.9.0","express":"~3.5.0","lab":"^3.1.1"},"gitHead":"5bac19ba67df12988f0232f7c4a98429f9212151","_id":"middleware-flow@0.6.0","_shasum":"7c3944b606f2c2b2e6f5648da5111a2995ac1047","_from":".","_npmVersion":"1.4.20","_npmUser":{"name":"tjmehta","email":"tejesh.mehta@gmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"dist":{"shasum":"7c3944b606f2c2b2e6f5648da5111a2995ac1047","size":6192,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.6.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.6.0.tgz"},"publish_time":1409854387812,"_cnpm_publish_time":1409854387812,"_hasShrinkwrap":false},"0.5.1":{"name":"middleware-flow","version":"0.5.1","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"lab -l -c test","test-watch":"nodemon --exec npm test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"contributors":[{"name":"Bryan Kendall","email":"bryan@bryankendall.com"}],"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"101":"^0.6.0","callback-count":"0.0.3"},"devDependencies":{"supertest":"^0.9.0","express":"~3.5.0","lab":"^3.1.1"},"gitHead":"610f73f54a819d541e8ae481f71e980bd1c8cedd","_id":"middleware-flow@0.5.1","_shasum":"8559432a6ef50eb072d827eaf097fc0bf782a755","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"dominathan","email":"nathan219@gmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"dist":{"shasum":"8559432a6ef50eb072d827eaf097fc0bf782a755","size":12408,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.5.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.5.1.tgz"},"publish_time":1405462606873,"_cnpm_publish_time":1405462606873,"_hasShrinkwrap":false},"0.5.0":{"name":"middleware-flow","version":"0.5.0","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"lab -l -c test","test-watch":"nodemon --exec npm test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"contributors":[{"name":"Bryan Kendall","email":"bryan@bryankendall.com"}],"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"101":"^0.3.0","callback-count":"0.0.3"},"devDependencies":{"supertest":"^0.9.0","express":"~3.5.0","lab":"^3.1.1"},"gitHead":"763cc21df498d109b45c787385a87e44af54286f","_id":"middleware-flow@0.5.0","_shasum":"0fdb9dc2403cd6ff06508c3a947d9d416a002fa2","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"bkendall","email":"bryan@bryankendall.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"dist":{"shasum":"0fdb9dc2403cd6ff06508c3a947d9d416a002fa2","size":7075,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.5.0.tgz"},"publish_time":1404853037674,"_cnpm_publish_time":1404853037674,"_hasShrinkwrap":false},"0.4.1":{"name":"middleware-flow","version":"0.4.1","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"lab -l -c test","test-watch":"nodemon --exec npm test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"101":"^0.3.0","callback-count":"0.0.3"},"devDependencies":{"supertest":"^0.9.0","express":"~3.5.0","lab":"^3.1.1"},"_id":"middleware-flow@0.4.1","_shasum":"aa12312a11ed499f7b005d1537b66fbce4119cc8","_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"tjmehta","email":"tejesh.mehta@gmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"dist":{"shasum":"aa12312a11ed499f7b005d1537b66fbce4119cc8","size":5334,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.4.1.tgz"},"publish_time":1401844418286,"_cnpm_publish_time":1401844418286,"_hasShrinkwrap":false},"0.4.0":{"name":"middleware-flow","version":"0.4.0","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"lab -l -c test","test-watch":"nodemon --exec npm test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"101":"^0.3.0","callback-count":"0.0.3"},"devDependencies":{"supertest":"^0.9.0","express":"~3.5.0","lab":"^3.1.1"},"_id":"middleware-flow@0.4.0","dist":{"shasum":"68cd378ff72665adfcd4114d87626788fa3fa0c9","size":4655,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.4.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjmehta","email":"tj_mehta@hotmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"publish_time":1400446743756,"_cnpm_publish_time":1400446743756,"_hasShrinkwrap":false},"0.3.1":{"name":"middleware-flow","version":"0.3.1","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"lab -l test","test-watch":"nodemon --exec lab -l test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"101":"^0.3.0","callback-count":"0.0.3"},"devDependencies":{"supertest":"^0.9.0","express":"~3.5.0","lab":"^3.1.1"},"_id":"middleware-flow@0.3.1","dist":{"shasum":"8df3204e3b2575f59dc286f93476f4cbabaef069","size":4286,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.3.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjmehta","email":"tj_mehta@hotmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"publish_time":1399878225259,"_cnpm_publish_time":1399878225259,"_hasShrinkwrap":false},"0.3.0":{"name":"middleware-flow","version":"0.3.0","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"lab -l test","test-watch":"nodemon --exec lab -l test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"101":"^0.3.0","callback-count":"0.0.3"},"devDependencies":{"supertest":"^0.9.0","express":"~3.5.0","lab":"^3.1.1"},"_id":"middleware-flow@0.3.0","dist":{"shasum":"0784145eb384dc21b075639b7fca29b955666cfb","size":4412,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.3.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjmehta","email":"tj_mehta@hotmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"publish_time":1399878097739,"_cnpm_publish_time":1399878097739,"_hasShrinkwrap":false},"0.2.1":{"name":"middleware-flow","version":"0.2.1","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"callback-count":"0.0.3"},"devDependencies":{"should":"^3.1.3","mocha":"^1.17.1","supertest":"^0.9.0","express":"^3.5.0"},"_id":"middleware-flow@0.2.1","dist":{"shasum":"c998578f875b049308dac7c1f87ab0726bb199e3","size":3628,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"tjmehta","email":"tejesh.mehta@gmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"publish_time":1398738773164,"_cnpm_publish_time":1398738773164,"_hasShrinkwrap":false},"0.2.0":{"name":"middleware-flow","version":"0.2.0","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"callback-count":"0.0.3"},"devDependencies":{"should":"^3.1.3","mocha":"^1.17.1","supertest":"^0.9.0","express":"^3.5.0"},"_id":"middleware-flow@0.2.0","dist":{"shasum":"e297cc3d4a7b2f37feeb49e94cfa29d509953900","size":3065,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.2.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjmehta","email":"tj_mehta@hotmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"publish_time":1394347761981,"_cnpm_publish_time":1394347761981,"_hasShrinkwrap":false},"0.1.2":{"name":"middleware-flow","version":"0.1.2","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"callback-count":"0.0.3"},"devDependencies":{"should":"^3.1.3","mocha":"^1.17.1","supertest":"^0.9.0","express":"^3.5.0"},"_id":"middleware-flow@0.1.2","dist":{"shasum":"43d188f85633c90cb3351244321e1e9e8362633d","size":2374,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.1.2.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjmehta","email":"tj_mehta@hotmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"publish_time":1394341759760,"_cnpm_publish_time":1394341759760,"_hasShrinkwrap":false},"0.1.1":{"name":"middleware-flow","version":"0.1.1","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"callback-count":"0.0.3"},"devDependencies":{"should":"^3.1.3","mocha":"^1.17.1","supertest":"^0.9.0","express":"^3.5.0"},"_id":"middleware-flow@0.1.1","dist":{"shasum":"14cb09603b00f90f971960c3ac4317d769ff3978","size":2370,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.1.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjmehta","email":"tj_mehta@hotmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"publish_time":1394340756980,"_cnpm_publish_time":1394340756980,"_hasShrinkwrap":false},"0.1.0":{"name":"middleware-flow","version":"0.1.0","description":"Middleware control flow library: series, parallel, or, and","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test"},"repository":{"type":"git","url":"https://github.com/tjmehta/middleware-flow.git"},"author":{"name":"Tejesh Mehta"},"license":"MIT","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"homepage":"https://github.com/tjmehta/middleware-flow","dependencies":{"callback-count":"0.0.3"},"devDependencies":{"should":"^3.1.3","mocha":"^1.17.1","supertest":"^0.9.0"},"_id":"middleware-flow@0.1.0","dist":{"shasum":"c2af078a592823219a9551dce3d1619bd6f9706e","size":2363,"noattachment":false,"key":"/middleware-flow/-/middleware-flow-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/middleware-flow/download/middleware-flow-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjmehta","email":"tj_mehta@hotmail.com"},"maintainers":[{"name":"bkendall","email":"bryan@bryankendall.com"},{"name":"dominathan","email":"nathan219@gmail.com"},{"name":"tjmehta","email":"tejesh.mehta@gmail.com"}],"publish_time":1394340622488,"_cnpm_publish_time":1394340622488,"_hasShrinkwrap":false}},"readme":"# middleware-flow [![Build Status](https://travis-ci.org/tjmehta/middleware-flow.png?branch=master)](https://travis-ci.org/tjmehta/middleware-flow)\n\nMiddleware control flow library\n\n# Installation\n```bash\nnpm install middleware-flow\n```\n\n# Examples\n\n## series(middlewares...)\n\n```js\nvar series = require('middleware-flow').series;\nvar app = require('express')();\n\napp.use(series(mw1, mw2, mw2)); // equivalent to app.use(mw1, mw2, mw3);\n```\n\n## parallel(middlewares...)\n\n```js\nvar parallel = require('middleware-flow').parallel;\nvar app = require('express')();\n                                  // runs the middlewares in 'parallel'\napp.use(parallel(mw1, mw2, mw2)); // if err, returns the first error that occurred\n```\n\n## parallelWait(middlewares...)\n\n```js\nvar parallelWait = require('middleware-flow').parallelWait;\nvar app = require('express')();\n                                  // runs the middlewares in 'parallel' and waits for all of them before to return also in case of err\napp.use(parallelWait(mw1, mw2, mw2)); // if err, returns the first error that occurred\n```\n\n## each\n```js\nvar each = require('middleware-flow').each;\nvar arr = [1,2,3];\nvar app = require('express')();\n                                  // runs the middlewares in 'parallel'\napp.use(\n  each(arr,\n    // runs the middlewares in parallel\n    function (eachReq, res, next) {\n      // eachReq is a scoped req for the each function that reads from req,\n      // but writes to it's own scope (prototypically inherits from request)\n    },\n    function (item, req, eachReq, res, next) {\n      // if middleware accepts five arguments, the current item and the original req are passed\n      // eachReq is a scoped req for the each function that reads from req,\n      // but writes to it's own scope (prototypically inherits from request)\n    })\n); // if err, returns the first error that occurred\n```\n\n## or(middlewares...)\n\n```js\nvar or = require('middleware-flow').or;\nvar app = require('express')();\n                                             // runs the middlewares in series, until one passes (no next(err));\napp.use(or(user.isOwner, user.isModerator)); // if err, returns the first error that occurred\n```\n\n## and(middlewares...)\n\nSame as series.\n\n## if(value).then(middlewares...).else(middlewares...)\n\n```js\nvar if = require('middleware-flow').if;\nvar app = require('express')();\n\napp.use(\n  if(true)\n    .then(one, two, three)\n    .else(error)\n);\n```\n\n## syncIf(fn).then(middlewares...).else(middlewares...)\n\n```js\nvar syncIf = require('middleware-flow').syncIf;\nvar app = require('express')();\n\napp.use(\n  syncIf(nameQueryExists)   // accepts a sync function that returns a boolean\n    .then(one, two, three)  // true -> then, error -> skips all next(err)\n    .else(error)\n);\nfunction nameQueryExists (req, res) {\n  return exists(req.query.name);\n}\nfunction exists (val) {\n  return val !== null && val !== undefined;\n}\n```\n\n## asyncIf(fn).then(middlewares...).else(middlewares...)\n\n```js\nvar asyncIf = require('middleware-flow').asyncIf;\nvar or = require('middleware-flow').or;\nvar fs = require('fs');\nvar app = require('express')();\n\napp.use(\n  asyncIf(bodyFileExists)    // expects boolean as the result argument\n    .then(one, two, three)   // true -> then, false -> else, error -> skips all next(err)\n    .else(other)\n);\nfunction logExists (req, res, cb) {\n  fs.exists(req.body.file, function (exists) {\n    cb(null, exists);\n  });\n}\n```\n\n## mwIf(middleware).then(middlewares..).else(middlewares..)\n\n```js\nvar mwIf = require('middleware-flow').mwIf;\nvar app = require('express')();\n\napp.use(\n  mwIf(userIsModerator)    // error here, just runs the else middlewares\n    .then(one, two, three) // no error -> then, error -> else\n    .else(other)           // if other is an error middleware it will recieve\n                           //   the error else the error will be ignored\n);\nfunction userIsModerator (req, res, next) {\n  if (!req.user.isModerator) {\n    next(new Error('access denied'));\n  }\n  else {\n    next();\n  }\n}\n```\n\n## try(middlewares..).catch(middlewares..)\n\n```js\nvar flow = require('middleware-flow');\nvar app = require('express')();\n\napp.use(\n  flow.try(saveUser) // error here, just runs the catch middlewares\n    .catch(rollback) // no error -> other, error -> rollback\n                     // if rollback is an error middleware it will recieve\n                     //   the error else the error will be ignored\n);\nfunction saveUser (req, res, next) {\n  db.save(req.user, next);\n}\n```\n\n## bg(middlewares...)\n\n```js\napp.use(\n  flow.bg(mw1, mw2, mw2)\n); // runs the middlewares in series in the background\n\n```\n\n# License\n### MIT\n","_attachments":{},"homepage":"https://github.com/tjmehta/middleware-flow","bugs":{"url":"https://github.com/tjmehta/middleware-flow/issues"},"license":"MIT"}