Sha256: cd809cd970537eca99ad0892985869f603b05cba7955c7447a5c951cda080b23
Contents?: true
Size: 521 Bytes
Versions: 69
Compression:
Stored size: 521 Bytes
Contents
var functions = require('./functions'); var bind = require('../function/bind'); var forEach = require('../array/forEach'); var slice = require('../array/slice'); /** * Binds methods of the object to be run in it's own context. */ function bindAll(obj, rest_methodNames){ var keys = arguments.length > 1? slice(arguments, 1) : functions(obj); forEach(keys, function(key){ obj[key] = bind(obj[key], obj); }); } module.exports = bindAll;
Version data entries
69 entries across 69 versions & 2 rubygems