1.0.0 • Published 7 years ago

auto-bind-extend v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

auto-bind-extend

codecov.io Build Status

a simple class that can be used to put your function context troubles to rest. Based on auto-bind

example

const BaseAutoBind = require('auto-bind-extend');

class Cool extends BaseAutoBind {
    constructor() {
        super();
        this.name = 'Cool';
    }

    say() {
        return this.name;
    }
}

let cool = new Cool();

// No matter where this function may travel, it'll stay cool
let coolSayFn = cool.say;
console.log(coolSayFn()); // Cool!

dev

npm test
npm run coverage