MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / enforceReturnValue

Function enforceReturnValue

lib/test/angular/1.5.0/angular.js:4441–4449  ·  view source on GitHub ↗
(name, factory)

Source from the content-addressed store, hash-verified

4439 }
4440
4441 function enforceReturnValue(name, factory) {
4442 return function enforcedReturnValue() {
4443 var result = instanceInjector.invoke(factory, this);
4444 if (isUndefined(result)) {
4445 throw $injectorMinErr('undef', "Provider '{0}' must return a value from $get factory method.", name);
4446 }
4447 return result;
4448 };
4449 }
4450
4451 function factory(name, factoryFn, enforce) {
4452 return provider(name, {

Callers 1

factoryFunction · 0.70

Calls 1

isUndefinedFunction · 0.70

Tested by

no test coverage detected