{"name":"stream-iterate","version":"1.1.1","description":"Iterate through the values of a stream","main":"index.js","dependencies":{},"devDependencies":{"from2":"^1.3.0","standard":"^3.3.2","tape":"^4.0.0"},"repository":{"type":"git","url":"https://github.com/mafintosh/stream-iterate.git"},"scripts":{"test":"standard && tape test.js"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/stream-iterate/issues"},"homepage":"https://github.com/mafintosh/stream-iterate","gitHead":"7a6e5e07b213fccd3efffda5f14b0442b1d360c9","_id":"stream-iterate@1.1.1","_shasum":"5d7d197aa52bc9e271b44547c9e388b2b1b33836","_from":".","_npmVersion":"2.7.5","_nodeVersion":"1.6.4","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"dist":{"shasum":"5d7d197aa52bc9e271b44547c9e388b2b1b33836","tarball":"http://registry-npm.ywwl.com/stream-iterate/download/stream-iterate-1.1.1.tgz","integrity":"sha512-yPAn1B+LySdGd6CK0o9HgZsWKIDMpCucpo6UgoFbIdxnRzGEZoh9fHmBGA7pz6l/Gc0Rtj2Q0K03z7jWyifY2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWorUMnXVQJY4yGl2bvMrjmywePU/+C1cCOM7i0jZaNAIhAJIksKhu9iNchzTmCnOeo3jk+rqf6RP43X28teSDOi5s"}],"size":2364,"noattachment":false,"key":"/stream-iterate/-/stream-iterate-1.1.1.tgz"},"directories":{},"readme":"# stream-iterate\n\nIterate through the values in a stream.\n\n```\nnpm install stream-iterate\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/stream-iterate.svg?style=flat)](http://travis-ci.org/mafintosh/stream-iterate)\n\n## Usage\n\n``` js\nvar iterate = require('stream-iterate')\nvar from = require('from2')\n\nvar stream = from.obj(['a', 'b', 'c'])\n\nvar read = iterate(stream)\n\nloop()\n\n// recursively iterates through each item in the stream\nfunction loop () {\n  read(function (err, data, next) {\n    console.log(err, data)\n    next()\n    loop()\n  })\n}\n```\n\nIf you don't call `next` and call `read` again the same `(err, value)` pair will be returned.\n\nYou can use this module to implement stuff like [a streaming merge sort](https://github.com/mafintosh/stream-iterate/blob/master/test.js#L5-L47).\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1428600254964,"_cnpm_publish_time":1428600254964,"dist-tags":{"latest":"1.2.0"}}