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

Function instantiate

lib/test/angular/1.4.3/angular.js:4453–4461  ·  view source on GitHub ↗
(Type, locals, serviceName)

Source from the content-addressed store, hash-verified

4451 }
4452
4453 function instantiate(Type, locals, serviceName) {
4454 // Check if Type is annotated and use just the given function at n-1 as parameter
4455 // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);
4456 // Object creation: http://jsperf.com/create-constructor/2
4457 var instance = Object.create((isArray(Type) ? Type[Type.length - 1] : Type).prototype || null);
4458 var returnedValue = invoke(Type, instance, locals, serviceName);
4459
4460 return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;
4461 }
4462
4463 return {
4464 invoke: invoke,

Callers

nothing calls this directly

Calls 4

invokeFunction · 0.70
isObjectFunction · 0.70
isFunctionFunction · 0.70
isArrayFunction · 0.50

Tested by

no test coverage detected