node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…

bind-all

Bind all methods to an object.

bind-all

Create singletons from objects.

$ npm install bind-all
function User() {
  this.x = 4;
}
 
User.prototype.y = function y() {
  return this.x;
};
 
var user = bindAll(new User());
 
user.y.apply(this); // 4