MCPcopy Create free account
hub / github.com/apache/cloudstack / provider

Function provider

tools/ngui/static/js/lib/angular.js:2762–2770  ·  view source on GitHub ↗
(name, provider_)

Source from the content-addressed store, hash-verified

2760 }
2761
2762 function provider(name, provider_) {
2763 if (isFunction(provider_) || isArray(provider_)) {
2764 provider_ = providerInjector.instantiate(provider_);
2765 }
2766 if (!provider_.$get) {
2767 throw Error('Provider ' + name + ' must define $get factory method.');
2768 }
2769 return providerCache[name + providerSuffix] = provider_;
2770 }
2771
2772 function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }
2773

Callers 2

factoryFunction · 0.70

Calls 3

isFunctionFunction · 0.85
isArrayFunction · 0.85
ErrorFunction · 0.50

Tested by

no test coverage detected