tinyco

1.0.1 • Public • Published

tinyco

Build Status

Simple coroutines using generators


Installing

npm install --save tinyco

Example

'use strict';
 
const c = require('tinyco');
 
function asyncAdd( a, b ) {
  return new Promise( resolve => setTimeout( () => resolve( a + b ), 100 ) );
}
 
c(function*() {
  let val = yield asyncAdd( 1, 2 );
  console.log( val );
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i tinyco

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • kevincennis
  • spmurrayzzz