vadimdemedes / co-bind

Function#bind for generator functions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Circle CI

$ npm test

License

WTFPL.

About

Function#bind for generator functions.


Languages

Language:JavaScript 100.0%