0.0.1 • Published 10 years ago

co-lazy v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

co-lazy

Lazily create a co stream when it's first read from.

Useful for when streams need setup and you for example map them over values with co-cat.

Example

var lazy = require('co-lazy');

var stream = lazy(function*(){
  yield doSomeSetup();

  return function*(end){
    // .. the stream implementation  
  }
});

API

lazy(fn)

Lazily create a stream from fn, returning a stream immediately.

Installation

$ npm install co-lazy

License

MIT

0.0.1

10 years ago

0.0.0

10 years ago