0.4.1 • Published 12 years ago

iterator-stream v0.4.1

Weekly downloads
1
License
-
Repository
github
Last release
12 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

12 years ago

0.4.0

13 years ago

0.3.0

13 years ago

0.2.1

13 years ago

0.1.1

13 years ago

0.1.0

13 years ago