MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / invoke

Function invoke

lib/test/angular/1.6.7/angular.js:5083–5102  ·  view source on GitHub ↗
(fn, self, locals, serviceName)

Source from the content-addressed store, hash-verified

5081 }
5082
5083 function invoke(fn, self, locals, serviceName) {
5084 if (typeof locals === 'string') {
5085 serviceName = locals;
5086 locals = null;
5087 }
5088
5089 var args = injectionArgs(fn, locals, serviceName);
5090 if (isArray(fn)) {
5091 fn = fn[fn.length - 1];
5092 }
5093
5094 if (!isClass(fn)) {
5095 // http://jsperf.com/angularjs-invoke-apply-vs-switch
5096 // #5388
5097 return fn.apply(self, args);
5098 } else {
5099 args.unshift(null);
5100 return new (Function.prototype.bind.apply(fn, args))();
5101 }
5102 }
5103
5104
5105 function instantiate(Type, locals, serviceName) {

Callers

nothing calls this directly

Calls 3

injectionArgsFunction · 0.70
isClassFunction · 0.70
isArrayFunction · 0.50

Tested by

no test coverage detected