chensenlai 10988628a0 语音房项目初始化 hace 5 años
..
.npmignore 10988628a0 语音房项目初始化 hace 5 años
History.md 10988628a0 语音房项目初始化 hace 5 años
Makefile 10988628a0 语音房项目初始化 hace 5 años
Readme.md 10988628a0 语音房项目初始化 hace 5 años
example.js 10988628a0 语音房项目初始化 hace 5 años
index.js 10988628a0 语音房项目初始化 hace 5 años
package.json 10988628a0 语音房项目初始化 hace 5 años
test.js 10988628a0 语音房项目初始化 hace 5 años

Readme.md

co-from-stream

Create a co generator stream from a node stream.

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