1.0.2 • Published 8 years ago

binderify v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Works with classes and simple objects

class Node {
    constructor(data) {
        binderify(this);

        this.data = data;
    }

    report() {
        return this.data;
    }
}

const node = new Node(128);
const method = node.report;
assert.equal(method(), 128);
const obj = {
    val: 64,
    ret: function() {
        return this.val;
    },
};

binderify(obj);

const method = obj.ret;
assert.equal(method(), 64);
1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago