util-lib-bind
v1.0.3
Published
Bind method of encapsulation integration
Downloads
1
Readme
util-lib-bind
Bind method of encapsulation integration
Usage
const utils = require('util-lib-bind');
function add (a, b) {
console.log('this', this);
return a + b + this.c;
}
let obj = {
c: 521,
};
window.c = 1314;
let fn = utils.bind(add, obj, 10)
console.log(fn(10));