co-bind

v1.0.0
Function#bind for generator functions
co bind koa

co-bind

Function#bind for generator functions. Supports all the same features as native .bind().

Installation

$ npm install co-bind --save

Usage

const bind = require('co-bind');

function * test () {
    
}

let newTest = bind(test, context, 'hello', 'world'); // bind (fn, context[, arg1[, arg2[, ...]]])

Tests

$ npm test

License

WTFPL.

npm i co-bind

Metadata

  • WTFPL
  • Whatever
  • Vadim Demedes
  • released 3/30/2015

Downloads

Maintainers