MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / enforceReturnValue

Function enforceReturnValue

code/songhop/www/lib/angular/angular.js:4020–4028  ·  view source on GitHub ↗
(name, factory)

Source from the content-addressed store, hash-verified

4018 }
4019
4020 function enforceReturnValue(name, factory) {
4021 return function enforcedReturnValue() {
4022 var result = instanceInjector.invoke(factory, this);
4023 if (isUndefined(result)) {
4024 throw $injectorMinErr('undef', "Provider '{0}' must return a value from $get factory method.", name);
4025 }
4026 return result;
4027 };
4028 }
4029
4030 function factory(name, factoryFn, enforce) {
4031 return provider(name, {

Callers 1

factoryFunction · 0.70

Calls 1

isUndefinedFunction · 0.70

Tested by

no test coverage detected