source: frontend/node_modules/underscore/cjs/bind.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 559 bytes
Line 
1var restArguments = require('./restArguments.js');
2var isFunction = require('./isFunction.js');
3var _executeBound = require('./_executeBound.js');
4
5// Create a function bound to a given object (assigning `this`, and arguments,
6// optionally).
7var bind = restArguments(function(func, context, args) {
8 if (!isFunction(func)) throw new TypeError('Bind must be called on a function');
9 var bound = restArguments(function(callArgs) {
10 return _executeBound(func, bound, context, this, args.concat(callArgs));
11 });
12 return bound;
13});
14
15module.exports = bind;
Note: See TracBrowser for help on using the repository browser.