bindself

1.0.0 • Public • Published

bindself

Binds all class methods to object.

Usage

const bindself = require('bindself');

class A {
  constructor() {
    bindself(this);
  }

  something() {
    // do something with this
  }
}

const a = new A();

// now a.something() is bound to a

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    2

Package Sidebar

Install

npm i bindself

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • sebasgarcep