bind-all

Bind all methods to an object.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
bind-all
601.0.06 years ago9 years agoMinified + gzip package size for bind-all in KB

Readme

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