0.4.1 • Published 11 years ago

iterator-stream v0.4.1

Weekly downloads
1
License
-
Repository
github
Last release
11 years ago

IteratorStream

An adapter for turning an iterator into a streaming iterator.

Installation

$ npm install iterator-stream

Usage

var itstream = require('iterator-stream');
var natural = { n: 0, next: function() { return this.n++ } };
// In the future when we have ES6 generators: 
//   function* naturalGenerator() { var n = 0; while (1) yield n++; }
//   var natural = naturalGenerator();

itstream(natural).pipe(process.stdout); // spits out natural numbers to stdout
0.4.1

11 years ago

0.4.0

12 years ago

0.3.0

12 years ago

0.2.1

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago