MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / enforceReturnValue

Function enforceReturnValue

web/static/bower_components/angular/angular.js:4328–4336  ·  view source on GitHub ↗
(name, factory)

Source from the content-addressed store, hash-verified

4326 }
4327
4328 function enforceReturnValue(name, factory) {
4329 return function enforcedReturnValue() {
4330 var result = instanceInjector.invoke(factory, this);
4331 if (isUndefined(result)) {
4332 throw $injectorMinErr('undef', "Provider '{0}' must return a value from $get factory method.", name);
4333 }
4334 return result;
4335 };
4336 }
4337
4338 function factory(name, factoryFn, enforce) {
4339 return provider(name, {

Callers 1

factoryFunction · 0.85

Calls 1

isUndefinedFunction · 0.85

Tested by

no test coverage detected