context-binder

1.0.3 • Public • Published

Build Status codecov


Automatic Context Binding

AboutInstallUsage

About

This is a small package that automatically binds 'this' context to every method outside of your class constructor.

Install

npm i --save context-binder

Usage

const contextBind = require('context-binder');
 
class Test {
  constructor() {
    contextBind(this);
  }
 
  foo() {
    // do something
  }
 
  bar() {
    // do something
  }
};

Package Sidebar

Install

npm i context-binder

Weekly Downloads

4

Version

1.0.3

License

MIT

Unpacked Size

7.92 kB

Total Files

9

Last publish

Collaborators

  • balend