source: frontend/node_modules/underscore/modules/_executeBound.js

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

Fix frontend appearance

  • Property mode set to 100644
File size: 584 bytes
Line 
1import baseCreate from './_baseCreate.js';
2import isObject from './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.
7export default function 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}
Note: See TracBrowser for help on using the repository browser.