MCPcopy
hub / github.com/jquery/esprima / provider

Function provider

test/3rdparty/angular-1.2.5.js:3547–3556  ·  view source on GitHub ↗
(name, provider_)

Source from the content-addressed store, hash-verified

3545 }
3546
3547 function provider(name, provider_) {
3548 assertNotHasOwnProperty(name, 'service');
3549 if (isFunction(provider_) || isArray(provider_)) {
3550 provider_ = providerInjector.instantiate(provider_);
3551 }
3552 if (!provider_.$get) {
3553 throw $injectorMinErr('pget', "Provider '{0}' must define $get factory method.", name);
3554 }
3555 return providerCache[name + providerSuffix] = provider_;
3556 }
3557
3558 function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }
3559

Callers 1

factoryFunction · 0.85

Calls 3

assertNotHasOwnPropertyFunction · 0.85
isFunctionFunction · 0.85
isArrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…