Skip to content

juliangruber/co-from-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Create a co generator stream from a node stream.

Resources

Stars

Watchers

Forks

Packages

No packages published