Skip to content

renegare/garity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Something hopefully useful ...

Resources

License

Stars

Watchers

Forks

Packages

No packages published