1.0.0 • Published 8 years ago

bind-all v1.0.0

Weekly downloads
14,278
License
SEE LICENSE IN LI...
Repository
github
Last release
8 years ago

bind-all

CircleCI Codecov

Create singletons from objects.

Installation

$ npm install bind-all

API

function User() {
  this.x = 4;
}

User.prototype.y = function y() {
  return this.x;
};

var user = bindAll(new User());

user.y.apply(this); // 4