source: frontend/node_modules/underscore/cjs/_executeBound.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: 609 bytes
Line 
1var _baseCreate = require('./_baseCreate.js');
2var isObject = require('./isObject.js');
3
4// Internal function to execute `sourceFunc` bound to `context` with optional
5// `args`. Determines whether to execute a function as a constructor or as a
6// normal function.
7function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
8 if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
9 var self = _baseCreate(sourceFunc.prototype);
10 var result = sourceFunc.apply(self, args);
11 if (isObject(result)) return result;
12 return self;
13}
14
15module.exports = executeBound;
Note: See TracBrowser for help on using the repository browser.