abind
Auto bind instance methods of classes.
Installation
$ npm install abind --save
Usage
'use strict' const abind = { thisname = name } { return `Hi, i'm ` } let sayHi = 'Tom' console // -> Hi, i'm Tom
Signature
abind(instance, options) -> Object
Params
Name | Type | Description |
---|---|---|
instance | Object | Instance to bind |
options | Object | Optional settings |
options.proto | Object | Prototype to bind |
options.excludes | string[] | Names to exclude |
License
This software is released under the MIT License.