bind all the functions to an object
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples
node_modules
LICENCE
Makefile
README.md
index.js
package.json

README.md

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()