Files
k8s-set-context/node_modules/underscore/cjs/bind.js
github-actions[bot] 52d71d28bd Add node modules and compiled JavaScript from main (#54)
Co-authored-by: Oliver King <oking3@uncc.edu>
2022-06-29 15:41:55 -04:00

16 lines
559 B
JavaScript

var restArguments = require('./restArguments.js');
var isFunction = require('./isFunction.js');
var _executeBound = require('./_executeBound.js');
// Create a function bound to a given object (assigning `this`, and arguments,
// optionally).
var bind = restArguments(function(func, context, args) {
if (!isFunction(func)) throw new TypeError('Bind must be called on a function');
var bound = restArguments(function(callArgs) {
return _executeBound(func, bound, context, this, args.concat(callArgs));
});
return bound;
});
module.exports = bind;