Skip to content

stephenbunch/bind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

import bind from '@stephenbunch/bind';

class Foo {
  @bind bar() {
    return this;
  }
}

var foo = new Foo();
expect( foo.bar.call( undefined ) ).to.equal( foo );

About

A simple decorator to bind a method to its owner.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published