@stephenbunch/bind
v0.1.1
Published
A simple decorator to bind a method to its owner.
Downloads
2
Readme
import bind from '@stephenbunch/bind';
class Foo {
@bind bar() {
return this;
}
}
var foo = new Foo();
expect( foo.bar.call( undefined ) ).to.equal( foo );