0.0.1 • Published 9 years ago
@nathanfaucett/bind v0.0.1
bind
binds object to functions this value
var bind = require("@nathanfaucett/bind");
var counter = {
value: 0
};
var inc = bind(function inc() {
this.value++;
}, counter);
inc();
// counter.value === 1
0.0.1
9 years ago