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

Function enforceReturnValue

lib/test/angular/1.8.0/angular.js:5041–5049  ·  view source on GitHub ↗
(name, factory)

Source from the content-addressed store, hash-verified

5039 }
5040
5041 function enforceReturnValue(name, factory) {
5042 return /** @this */ function enforcedReturnValue() {
5043 var result = instanceInjector.invoke(factory, this);
5044 if (isUndefined(result)) {
5045 throw $injectorMinErr('undef', 'Provider \'{0}\' must return a value from $get factory method.', name);
5046 }
5047 return result;
5048 };
5049 }
5050
5051 function factory(name, factoryFn, enforce) {
5052 return provider(name, {

Callers 1

factoryFunction · 0.70

Calls 1

isUndefinedFunction · 0.70

Tested by

no test coverage detected