npm.io
1.0.0 • Published 10 years ago

bind-all

Licence
SEE LICENSE IN LICENSE
Version
1.0.0
Deps
1
Vulns
0
Weekly
0

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

Keywords