Socket
Book a DemoInstallSign in
Socket

co-lazy

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-lazy

Lazily create co streams

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 19 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts