bind-all

1.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    89,735
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    89,735
  • 0.0.2
    10

Package Sidebar

Install

npm i bind-all

Weekly Downloads

73,865

Version

1.0.0

License

SEE LICENSE IN LICENSE

Last publish

Collaborators

  • segment-admin