{"_id":"co-read","_rev":"222976","name":"co-read","description":"Consume a readable stream generator-style","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"juliangruber","email":"julian@juliangruber.com"}],"time":{"modified":"2021-06-03T15:41:07.000Z","created":"2013-09-04T10:28:34.165Z","0.1.1":"2014-10-14T14:02:38.820Z","0.1.0":"2014-07-13T13:23:22.562Z","0.0.2":"2014-04-08T13:46:40.166Z","0.0.1":"2013-11-27T11:55:41.109Z","0.0.0":"2013-09-04T10:28:34.165Z"},"users":{},"author":{"name":"Julian Gruber","email":"mail@juliangruber.com","url":"http://juliangruber.com"},"repository":{"type":"git","url":"git://github.com/juliangruber/co-read.git"},"versions":{"0.1.1":{"name":"co-read","description":"Consume a readable stream generator-style","version":"0.1.1","repository":{"type":"git","url":"git://github.com/juliangruber/co-read.git"},"homepage":"https://github.com/juliangruber/co-read","main":"index.js","scripts":{"test":"make test"},"dependencies":{"stream-read":"~1.0.1"},"devDependencies":{"co":"^3.0.5","through":"^2.3.4","co-wait":"0.0.0","mocha":"^1.18.2"},"keywords":["co","generator","stream","readable"],"author":{"name":"Julian Gruber","email":"mail@juliangruber.com","url":"http://juliangruber.com"},"license":"MIT","bugs":{"url":"https://github.com/juliangruber/co-read/issues"},"_id":"co-read@0.1.1","dist":{"shasum":"b34ea6dfa4dced304f1f9597400d99d1a1302ba6","size":2764,"noattachment":false,"key":"/co-read/-/co-read-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/co-read/download/co-read-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"juliangruber","email":"julian@juliangruber.com"},"maintainers":[{"name":"juliangruber","email":"julian@juliangruber.com"}],"directories":{},"publish_time":1413295358820,"_cnpm_publish_time":1413295358820,"_hasShrinkwrap":false},"0.1.0":{"name":"co-read","description":"Consume a readable stream generator-style","version":"0.1.0","repository":{"type":"git","url":"git://github.com/juliangruber/co-read.git"},"homepage":"https://github.com/juliangruber/co-read","main":"index.js","scripts":{"test":"make test"},"dependencies":{"debug":"^1.0.3"},"devDependencies":{"co":"^3.0.5","through":"^2.3.4","co-wait":"0.0.0","mocha":"^1.18.2"},"keywords":["co","generator","stream","readable"],"author":{"name":"Julian Gruber","email":"mail@juliangruber.com","url":"http://juliangruber.com"},"license":"MIT","gitHead":"59fcfb5dd56e4c1de299d5c8d28edea6231bca20","bugs":{"url":"https://github.com/juliangruber/co-read/issues"},"_id":"co-read@0.1.0","_shasum":"b179b36cf56a9839b5676493b66ad210808c9590","_from":".","_npmVersion":"1.4.20","_npmUser":{"name":"juliangruber","email":"julian@juliangruber.com"},"maintainers":[{"name":"juliangruber","email":"julian@juliangruber.com"}],"dist":{"shasum":"b179b36cf56a9839b5676493b66ad210808c9590","size":3281,"noattachment":false,"key":"/co-read/-/co-read-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/co-read/download/co-read-0.1.0.tgz"},"directories":{},"publish_time":1405257802562,"_cnpm_publish_time":1405257802562,"_hasShrinkwrap":false},"0.0.2":{"name":"co-read","description":"Consume a readable stream generator-style","version":"0.0.2","repository":{"type":"git","url":"git://github.com/juliangruber/co-read.git"},"homepage":"https://github.com/juliangruber/co-read","main":"index.js","scripts":{"test":"make test"},"dependencies":{},"devDependencies":{"co":"~1.5.2","through":"~2.3.4","co-wait":"0.0.0","mocha":"~1.17.1"},"keywords":["co","generator","stream","readable"],"author":{"name":"Julian Gruber","email":"mail@juliangruber.com","url":"http://juliangruber.com"},"license":"MIT","bugs":{"url":"https://github.com/juliangruber/co-read/issues"},"_id":"co-read@0.0.2","dist":{"shasum":"fd093ca3415122a59d9213c597a0fb7f48adc430","size":3060,"noattachment":false,"key":"/co-read/-/co-read-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/co-read/download/co-read-0.0.2.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"juliangruber","email":"julian@juliangruber.com"},"maintainers":[{"name":"juliangruber","email":"julian@juliangruber.com"}],"directories":{},"publish_time":1396964800166,"_cnpm_publish_time":1396964800166,"_hasShrinkwrap":false},"0.0.1":{"name":"co-read","description":"Consume a readable stream generator-style","version":"0.0.1","repository":{"type":"git","url":"git://github.com/juliangruber/co-read.git"},"homepage":"https://github.com/juliangruber/co-read","main":"index.js","scripts":{"test":"set -e; for t in test/*.js; do node --harmony-generators $t; done"},"dependencies":{},"devDependencies":{"tape":"~1.1.0","co":"~1.5.2","through":"~2.3.4","co-wait":"0.0.0"},"keywords":["co","generator","stream","readable"],"author":{"name":"Julian Gruber","email":"mail@juliangruber.com","url":"http://juliangruber.com"},"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/juliangruber/co-read/issues"},"_id":"co-read@0.0.1","dist":{"shasum":"f81b3eb8a86675fec51e3d883a7f564e873c9389","size":3313,"noattachment":false,"key":"/co-read/-/co-read-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/co-read/download/co-read-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.13","_npmUser":{"name":"juliangruber","email":"julian@juliangruber.com"},"maintainers":[{"name":"juliangruber","email":"julian@juliangruber.com"}],"directories":{},"publish_time":1385553341109,"_cnpm_publish_time":1385553341109,"_hasShrinkwrap":false},"0.0.0":{"name":"co-read","description":"Consume a readable stream generator-style","version":"0.0.0","repository":{"type":"git","url":"git://github.com/juliangruber/co-read.git"},"homepage":"https://github.com/juliangruber/co-read","main":"index.js","scripts":{"test":"set -e; for t in test/*.js; do node --harmony-generators $t; done"},"dependencies":{},"devDependencies":{"tape":"~1.1.0","co":"~1.5.2","through":"~2.3.4","co-wait":"0.0.0"},"keywords":["co","generator","stream","readable"],"author":{"name":"Julian Gruber","email":"mail@juliangruber.com","url":"http://juliangruber.com"},"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/juliangruber/co-read/issues"},"_id":"co-read@0.0.0","dist":{"shasum":"39bf062e42edca1ed6fb0bb425c1d4606aa376a9","size":3115,"noattachment":false,"key":"/co-read/-/co-read-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/co-read/download/co-read-0.0.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"juliangruber","email":"julian@juliangruber.com"},"maintainers":[{"name":"juliangruber","email":"julian@juliangruber.com"}],"directories":{},"publish_time":1378290514165,"_cnpm_publish_time":1378290514165,"_hasShrinkwrap":false}},"readme":"\n# co-read\n\nConsume a readable stream generator-style. Works with streams1 (push) and\nstreams2 (pull) streams!\n\n[![build status](https://secure.travis-ci.org/juliangruber/co-read.svg)](http://travis-ci.org/juliangruber/co-read)\n[![downloads](https://img.shields.io/npm/dm/co-read.svg)](https://www.npmjs.org/package/co-read)\n\n## Example\n\nLog all chunks from a stream to stdout:\n\n```js\nvar http = require('http');\nvar co = require('co');\nvar read = require('co-read');\n\nco(function*() {\n  var stream = createStreamSomehow();\n  var buf;\n  while(buf = yield read(stream)) {\n    console.log(buf);\n  }\n})();\n```\n\nAlso check out `/example.js` for a complete example using http streams, both\nstreams1 and streams2 style.\n\n## API\n\n### read(stream)\n\nRead a chunk from `stream`.\n\n* Returns a truthy value when the stream emits data.\n* Returns undefined when the stream ended.\n* Throws an `Error` when `stream` emits one.\n\n## Installation\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install co-read\n```\n\n## Kudos\n\nThe streams2 part is based on\n[previous work](https://github.com/visionmedia/co/commit/d1f03a936a70d7c7cb27c9d95b53ed567a4ded10)\nfrom [TooTallNate](https://github.com/TooTallNate).\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_attachments":{},"homepage":"https://github.com/juliangruber/co-read","bugs":{"url":"https://github.com/juliangruber/co-read/issues"},"license":"MIT"}