包详细信息

bind-all

segmentio99kSEE LICENSE IN LICENSE1.0.0

Bind all methods to an object.

bind, bind-all

自述文件

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