MCPcopy
hub / github.com/angular-ui/ui-router / enforceReturnValue

Function enforceReturnValue

test/angular/1.6/angular.js:4948–4956  ·  view source on GitHub ↗
(name, factory)

Source from the content-addressed store, hash-verified

4946 }
4947
4948 function enforceReturnValue(name, factory) {
4949 return /** @this */ function enforcedReturnValue() {
4950 var result = instanceInjector.invoke(factory, this);
4951 if (isUndefined(result)) {
4952 throw $injectorMinErr('undef', 'Provider \'{0}\' must return a value from $get factory method.', name);
4953 }
4954 return result;
4955 };
4956 }
4957
4958 function factory(name, factoryFn, enforce) {
4959 return provider(name, {

Callers 1

factoryFunction · 0.70

Calls 1

isUndefinedFunction · 0.70

Tested by

no test coverage detected