Add node modules and compiled JavaScript from main (#172)

Co-authored-by: Oliver King <oking3@uncc.edu>
This commit is contained in:
github-actions[bot]
2022-02-09 17:16:49 -05:00
committed by GitHub
parent ee3c5aed75
commit 08d466b6ab
8070 changed files with 1753185 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
import restArguments from './restArguments.js';
import flatten from './_flatten.js';
import bind from './bind.js';
// Bind a number of an object's methods to that object. Remaining arguments
// are the method names to be bound. Useful for ensuring that all callbacks
// defined on an object belong to it.
export default restArguments(function(obj, keys) {
keys = flatten(keys, false, false);
var index = keys.length;
if (index < 1) throw new Error('bindAll must be passed function names');
while (index--) {
var key = keys[index];
obj[key] = bind(obj[key], obj);
}
return obj;
});