{"_id":"co-ware","_rev":"26-8afa31057f6049d84fa5b498c47a2870","name":"co-ware","description":"Ware inspired, easily create your own middleware layer using generators via co.","dist-tags":{"latest":"1.6.0"},"versions":{"0.0.0":{"name":"co-ware","version":"0.0.0","description":"Koa inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","dependencies":{"co":"^3.0.4","koa-compose":"^2.2.0","finished":"^1.1.1","debug":"^0.7.4"},"_id":"co-ware@0.0.0","dist":{"shasum":"71c16b8fe0b2cd2564f2874a9cd4ca6f09951a37","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-0.0.0.tgz","integrity":"sha512-g7UlbzVCP4zXxGEJkdZvO37fWapa9/ECcWQmK4D19dJQUYHf6/6JJNy+5mScIvoU4fVRnOJs2p8oyap614CQxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIACYdP7qPS/ssN1i5KZzxZQmm75BDIkF3f1MBu5sciFWAiEAkQIsLqKDXm7ADdBwFmtsE9tii8cCiu/yb5IN2RyFQEk="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}]},"1.0.0":{"name":"co-ware","version":"1.0.0","description":"Koa inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","dependencies":{"co":"^3.0.4","debug":"^0.7.4","koa-compose":"^2.2.0"},"devDependencies":{"mocha":"^1.18.2","should":"^3.2.0"},"_id":"co-ware@1.0.0","dist":{"shasum":"a68946dcece1f4994b5653a75241d249fa01bc1a","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-1.0.0.tgz","integrity":"sha512-8A5ieoL9ZJ6rXcVWeue9faClxZ0W4rkXJ4P77oNqzIOz12qVnGjGOPDoOct4mvOsNN198V+wvF2ekCIj5NlNlA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCu/bA6hNYK+/xJDWp7ywqPyc5nCuy8Acy/hEYEloXOdQIgNEZW/ZasC8C8Gb7EPztDALiEF0e18bdBMkXRej2XZzg="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}]},"1.0.1":{"name":"co-ware","version":"1.0.1","description":"Ware inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","keywords":["co","compose","layer","koa","middleware"],"dependencies":{"co":"^3.0.4","debug":"^0.7.4","koa-compose":"^2.2.0"},"devDependencies":{"mocha":"^1.18.2","should":"^3.2.0"},"repository":{"type":"git","url":"http://github.com/fundon/co-ware.git"},"bugs":{"url":"https://github.com/fundon/co-ware/issues"},"homepage":"https://github.com/fundon/co-ware","_id":"co-ware@1.0.1","dist":{"shasum":"5df6339a12c1ecd390c99c8002d07b5d41fbbe8f","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-1.0.1.tgz","integrity":"sha512-cQUi2ZplSv7wvKGWG1xJq1YGEZVG0/77JVxsEmfJL+l6AqBByoJXuk/fxpWbgDi/40YoJNhfXMHpdDSbvxurPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDpnpMLA8nxw6cSniZeObRDysHuio+QeRt6p4hRgn/B8AiA2UTmcGhPMhNxh2B2n/UXXDeFfkB2ibWU+J21mS+oC+w=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}]},"1.0.2":{"name":"co-ware","version":"1.0.2","description":"Ware inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","keywords":["co","compose","layer","koa","middleware"],"dependencies":{"co":"^3.0.4","debug":"^0.7.4","koa-compose":"^2.2.0"},"devDependencies":{"mocha":"^1.18.2","should":"^3.2.0"},"repository":{"type":"git","url":"http://github.com/fundon/co-ware.git"},"bugs":{"url":"https://github.com/fundon/co-ware/issues"},"homepage":"https://github.com/fundon/co-ware","_id":"co-ware@1.0.2","dist":{"shasum":"316d6812bdb8587a00d1d847865dbcbd94d46997","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-1.0.2.tgz","integrity":"sha512-aoBAHrEd+Y0vmBx+1cF6BcuIfLfVVxdmMeY4Cygx1EzXDdK5q9wLyLoNzYJtql659P/pbXnEtv/kDaNd4t3lvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGlHcmqOUs2aS6bizn1+P0szexQzSUroaoGRq1xnDyh7AiAhg33GklTTVXG26gn31iyr3d2WMqmBWHRYlTN6UfB3aA=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}]},"1.1.0":{"name":"co-ware","version":"1.1.0","description":"Ware inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","keywords":["co","compose","layer","koa","middleware"],"dependencies":{"co":"^3.0.4","debug":"^0.7.4","koa-compose":"^2.2.0"},"devDependencies":{"mocha":"^1.18.2","should":"^3.2.0"},"repository":{"type":"git","url":"http://github.com/fundon/co-ware.git"},"bugs":{"url":"https://github.com/fundon/co-ware/issues"},"homepage":"https://github.com/fundon/co-ware","_id":"co-ware@1.1.0","dist":{"shasum":"72fc2b3002c81e714b8f0e66a6cf9c14adec3de4","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-1.1.0.tgz","integrity":"sha512-NdAIOm85ta+xfy+Z6HoTWmiyRMaoJ/jdXZ7Sg2/n7CoFCem42LllXyO0hDjvrUw3boHtRFeM/ZW+8G183p8KAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID+9ZjhEqbGX8S7jmHXo98DfEnARI5r0riUWvZIJ+xtaAiEAujZR70kl26y/mwCxxWY3M6QIWviScLSAkY6SB1BYZPU="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}]},"1.2.0":{"name":"co-ware","version":"1.2.0","description":"Ware inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","keywords":["co","compose","layer","koa","middleware"],"dependencies":{"co":"^3.0.4","debug":"^0.7.4","koa-compose":"^2.2.0"},"devDependencies":{"mocha":"^1.18.2","should":"^3.2.0"},"repository":{"type":"git","url":"http://github.com/fundon/co-ware.git"},"bugs":{"url":"https://github.com/fundon/co-ware/issues"},"homepage":"https://github.com/fundon/co-ware","_id":"co-ware@1.2.0","dist":{"shasum":"0dcc6315a2c8f39b5c802ffe96c05a91c18c3400","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-1.2.0.tgz","integrity":"sha512-4chBm0EdBcseZvJD48TWavAg5MlRA37OEAvTDaTS4l+6Iy7g8SA1Khee1s27kwXADVk2SxucdEcjhE27OGO2dQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBO2DTZzzjnUp+L70tow22edqW1X7J+9ysch9K84c2bgIgTiPzaXj725qvom6XGqd7ES0DAq9oGq1G3l/Mdn3W/DM="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}]},"1.3.0":{"name":"co-ware","version":"1.3.0","description":"Ware inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","keywords":["co","compose","layer","koa","middleware"],"dependencies":{"co":"^3.0.4","debug":"^0.7.4","koa-compose":"^2.2.0"},"devDependencies":{"mocha":"^1.18.2","should":"^3.2.0"},"repository":{"type":"git","url":"http://github.com/fundon/co-ware.git"},"bugs":{"url":"https://github.com/fundon/co-ware/issues"},"homepage":"https://github.com/fundon/co-ware","_id":"co-ware@1.3.0","dist":{"shasum":"7ff27c60e8563a574ce9d755b4651da3e1f0e506","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-1.3.0.tgz","integrity":"sha512-xxY53sv+Ajd8HoJDeU6lIhxlgmE22aXh95kHDtyE5nEtpShQkKlhBJ/MwwEWyU8ytKC40Z+PrkYNh5IHFBpfyw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVBQE6eR8uLzDocMhK2kwRhNMXacQBDaPT/h9tacLSpQIhAL/wfqT1q9kFzmGigI6PjjSEmBy8bcVwJspDygPao7Jo"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}]},"1.5.0":{"name":"co-ware","version":"1.5.0","description":"Ware inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","keywords":["co","compose","layer","koa","middleware"],"dependencies":{"co":"^3.1.0","debug":"^0.7.4","koa-compose":"^2.3.0"},"devDependencies":{"mocha":"^1.21.4","should":"^3.3.2"},"repository":{"type":"git","url":"http://github.com/fundon/co-ware.git"},"bugs":{"url":"https://github.com/fundon/co-ware/issues"},"gitHead":"c92201052e9978c5c004e7c5d2822f5fd2a0091e","homepage":"https://github.com/fundon/co-ware","_id":"co-ware@1.5.0","_shasum":"15dd1883e88f732b115115c3111ed947d13c38c6","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}],"dist":{"shasum":"15dd1883e88f732b115115c3111ed947d13c38c6","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-1.5.0.tgz","integrity":"sha512-7BEqjx6aBbLYZbSYuudaHLlgVKvngqGpmIpB4cEtyvvNZOK1/jF5wwSSsA0tAJTRdiHIPDu3JcIzN5rLkTp1tw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEulrd4cQ35KxDFdJleV6Ks3kpadL07Y/xjbLHXomvkYAiBS9UtwbpCrjwsghqnwwolRxVMIT6+15nzCxBeG0C3fjQ=="}]}},"1.5.1":{"name":"co-ware","version":"1.5.1","description":"Ware inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","keywords":["co","compose","layer","koa","middleware"],"dependencies":{"co":"^3.1.0","debug":"^0.7.4","koa-compose":"^2.3.0"},"devDependencies":{"mocha":"^1.21.4","should":"^3.3.2"},"repository":{"type":"git","url":"http://github.com/fundon/co-ware.git"},"bugs":{"url":"https://github.com/fundon/co-ware/issues"},"gitHead":"26915240513fe257328b6af0fe41a00b341f560f","homepage":"https://github.com/fundon/co-ware","_id":"co-ware@1.5.1","_shasum":"274ca888d2549e269e362625fbd51f6cfd0ead70","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}],"dist":{"shasum":"274ca888d2549e269e362625fbd51f6cfd0ead70","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-1.5.1.tgz","integrity":"sha512-zo0qxf6oROhUo/AUXqWdSuos8fRUJs7re+vWtzyawF8yT62FiyWh7wLmeHwRgMsG4pP/Ea9Op6RRO4kBp+8Axg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhscGk20TRnhYZ1h9trB+URbkWuJfEGMrXQQYM9dm1PgIgEi0KUDNuQdm5w7TqxNJQikrB/8jMy6jFJUhowphwUsE="}]}},"1.5.2":{"name":"co-ware","version":"1.5.2","description":"Ware inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","keywords":["co","compose","layer","koa","middleware"],"dependencies":{"co":"^3.1.0","debug":"^0.7.4","koa-compose":"^2.3.0"},"devDependencies":{"mocha":"^1.21.4","should":"^3.3.2"},"repository":{"type":"git","url":"http://github.com/fundon/co-ware.git"},"bugs":{"url":"https://github.com/fundon/co-ware/issues"},"gitHead":"caf5f6941bbf06a1155a98756763e118cc590c9a","homepage":"https://github.com/fundon/co-ware","_id":"co-ware@1.5.2","_shasum":"f22e13bb818c82ac629043a462ef7eceec861714","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}],"dist":{"shasum":"f22e13bb818c82ac629043a462ef7eceec861714","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-1.5.2.tgz","integrity":"sha512-t7fqZ9l3XuTVj6Mr8ps3bAdOHrkFwW8SoK6n6gz5F7g0haMDoBqDagv6I4EMMfEDFGRQJsv90g0Mt0GRJR+3ww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCavuT71mHaq7IgvkIbIulSRjQEQPykEZqHP6lVQHDCdAIhAMhgRHLtrF4/MMdgCpn5T2L2ChvoGts4uyqi6v5lKS8E"}]}},"1.5.3":{"name":"co-ware","version":"1.5.3","description":"Ware inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","keywords":["co","compose","layer","koa","middleware"],"dependencies":{"co":"^3.1.0","debug":"^0.7.4","koa-compose":"^2.3.0"},"devDependencies":{"mocha":"^1.21.4","should":"^3.3.2"},"repository":{"type":"git","url":"http://github.com/fundon/co-ware.git"},"bugs":{"url":"https://github.com/fundon/co-ware/issues"},"gitHead":"197edaefcedc48a83a0e37f806e556491502c01c","homepage":"https://github.com/fundon/co-ware","_id":"co-ware@1.5.3","_shasum":"1e764b169ddea2ff1b23c6329dff178d634b873c","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}],"dist":{"shasum":"1e764b169ddea2ff1b23c6329dff178d634b873c","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-1.5.3.tgz","integrity":"sha512-TNRh8IWs+DJdduR5QJxVqugNfpN/h1AAGWE6CFv891/97v6VeY2iVgD2YyizXha9Qcz+um5ckOJH/Rq2PjbICg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDegB+h/AwZjDc+urvaq1MCbh9e3Zn6EDOio9aHf7wfTQIgUWmGytjr6I6RIfPu1KkmSK7Fd1ycJHv/pXbDlP/7zb8="}]}},"1.6.0":{"name":"co-ware","version":"1.6.0","description":"Ware inspired, easily create your own middleware layer using generators via co.","main":"index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/fundon/co-ware.git"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","keywords":["co","compose","layer","koa","middleware"],"dependencies":{"co":"^4.1.0","debug":"^2.1.1","koa-compose":"^2.3.0"},"devDependencies":{"mocha":"^2.1.0","should":"^4.6.2"},"gitHead":"8832621aa8064a19f97b27eec04df0b46285eb10","bugs":{"url":"https://github.com/fundon/co-ware/issues"},"homepage":"https://github.com/fundon/co-ware","_id":"co-ware@1.6.0","_shasum":"eec1286416403fc22341b42fb8e8042e2fa6b038","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.11.15","_npmUser":{"name":"fundon","email":"cfddream@gmail.com"},"maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}],"dist":{"shasum":"eec1286416403fc22341b42fb8e8042e2fa6b038","tarball":"https://registry.npmjs.org/co-ware/-/co-ware-1.6.0.tgz","integrity":"sha512-7HkkMKerAC3aTr6DS9aCSLbLeUuswQyboQBlZTbl8OwLzZL6qAngZMzHhyhDi6xhih1F0o0PEGWvVIgYnydnLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLyhtGWPECxHNI1tMLVeH8WxN8NB6s81CCB8QXFkg8rAIhAI0spWr4QmnRc1feB4EXMOfFt7ZmEJOMeGhRSYgVbxMb"}]}}},"readme":"# co-ware [![Build Status](https://travis-ci.org/fundon/co-ware.svg)](https://travis-ci.org/fundon/co-ware)\n  [Ware][] inspired, easily create your own middleware layer using generators via [co][].\n\n\n### Examples\n\n```js\nvar ware = require('..');\nvar w = ware()\n  .use(function *(next) {\n    this.x = 'hello';\n    yield next;\n  })\n  .use(function *(next) {\n    this.y = 'world';\n    yield next;\n  })\n  .use(function *(next) {\n    yield next;\n  });\n\nw.run({}, {}, function *() {\n  console.log(this.x, this.y);\n});\n```\n\nPrint the arguments of input.\n\n```js\nvar ware = require('..');\nvar w = ware()\n  .use(function *(next) {\n    console.log(this.input); // 1, 2, 3\n    yield next;\n  });\n\nw.run(1, 2, 3);\n```\n\nHandles error.\n\n```js\nvar ware = require('..');\nvar w = ware()\n  .use(function *(next) {\n    if ('42' != this.input[0].life) throw new Error();\n    yield next;\n  })\n  .use(function *(next) {\n    console.log('yes!');\n  })\n  .on('error', function (err) {\n    console.log('no!');\n  });\n\nw.run({ life: '41' }); // \"no!\"\nw.run({ life: '42' }); // \"yes!\"\n```\n\n### API\n\n#### ware()\n\n  Create a new list of middleware.\n\n#### .use(*fun)\n\n  Push a middleware fn(__GeneratorFunction__) onto the list. If the middleware has an arity of one more than the input to run it's an error middleware.\n\n#### .run(input..., [__GeneratorFunction__])\n\n  Runs the middleware functions with input... and optionally calls callback(__GeneratorFunction__).\n\n#### .clear()\n\n  Clear the middleware.\n\n### License\n\nMIT\n\n[ware]: https://github.com/segmentio/ware\n[co]: https://github.com/visionmedia/co\n","maintainers":[{"name":"fundon","email":"cfddream@gmail.com"}],"time":{"modified":"2022-06-13T06:23:51.925Z","created":"2014-03-11T02:49:38.497Z","0.0.0":"2014-03-11T02:49:38.497Z","1.0.0":"2014-04-07T10:25:03.150Z","1.0.1":"2014-04-07T10:29:46.313Z","1.0.2":"2014-04-07T10:36:31.041Z","1.1.0":"2014-04-07T13:05:13.950Z","1.2.0":"2014-04-09T06:10:46.998Z","1.3.0":"2014-04-15T11:31:35.614Z","1.5.0":"2014-08-23T09:10:21.323Z","1.5.1":"2014-08-25T02:50:05.194Z","1.5.2":"2014-08-25T02:52:04.493Z","1.5.3":"2014-08-25T04:41:59.755Z","1.6.0":"2015-01-28T16:20:53.051Z"},"author":{"name":"fundon","email":"cfddream@gmail.com"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/fundon/co-ware","keywords":["co","compose","layer","koa","middleware"],"repository":{"type":"git","url":"https://github.com/fundon/co-ware.git"},"bugs":{"url":"https://github.com/fundon/co-ware/issues"}}