0.0.1-6 • Published 8 years ago

garity v0.0.1-6

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

garity

coroutine(generator).length === generator.length

(short for coroutine wrapped generator)

:badges Build Status npm version

:installation

$ npm i -S garity

:usage

const ga = require('garity')
const co = require('bluebird').coroutine
const gen = function * (a, b, c, d) { yield d }

if (ga(co, gen).length === 4) {
  console.log('#1 Hey; as expected')
}

// => #1 Hey; as expected

const cg = ga(co)
if (cg(gen).length === 4) {
  console.log('#2 Hey; as expected')
}

// => #2 Hey; as expected

Thats about it ...