bindAll

1.0.0 • Public • Published

bindAll

bind all the functions to an object

Example

var o = bindAll({
        foo: function () {
            this.bar()
        }
    }, {
        bar: function () {
            assert(this === o)
        }
    }),
    assert = require("assert")

var f = o.foo
f()

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i bindAll

    Weekly Downloads

    2

    Version

    1.0.0

    License

    none

    Last publish

    Collaborators

    • raynos