Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 828 Bytes

Readme.md

File metadata and controls

39 lines (25 loc) · 828 Bytes

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