garity

0.0.1-6 • Public • Published

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 ...

Package Sidebar

Install

npm i garity

Weekly Downloads

4

Version

0.0.1-6

License

MIT

Last publish

Collaborators

  • renegare