Create a co generator stream from a node stream.
JavaScript
Switch branches/tags
Nothing to show
Latest commit 2a13050 Jul 27, 2014 @juliangruber badges
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml
History.md
Makefile
Readme.md
example.js
index.js
package.json
test.js

Readme.md

co-from-stream

Create a co generator stream from a node stream.

build status downloads

Usage

var co = require('co');
var fs = require('fs');
var fromStream = require('co-from-stream');

co(function*(){
  var read = fromStream(fs.createReadStream('index.js'));
  
  var data;
  while (data = yield read()) console.log(data.toString());
})();

API

fromStream(stream)

Create a co generator stream from stream.

Installation

$ npm install co-from-stream

License

MIT