garity
v0.0.1-6
Published
coroutine(generator).length === generator.length
Downloads
5
Maintainers
Readme
garity
coroutine(generator).length === generator.length
(short for coroutine wrapped generator)
:badges
: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 ...