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

Function getService

test/3rdparty/angular-1.2.5.js:3636–3651  ·  view source on GitHub ↗
(serviceName)

Source from the content-addressed store, hash-verified

3634 function createInternalInjector(cache, factory) {
3635
3636 function getService(serviceName) {
3637 if (cache.hasOwnProperty(serviceName)) {
3638 if (cache[serviceName] === INSTANTIATING) {
3639 throw $injectorMinErr('cdep', 'Circular dependency found: {0}', path.join(' <- '));
3640 }
3641 return cache[serviceName];
3642 } else {
3643 try {
3644 path.unshift(serviceName);
3645 cache[serviceName] = INSTANTIATING;
3646 return cache[serviceName] = factory(serviceName);
3647 } finally {
3648 path.shift();
3649 }
3650 }
3651 }
3652
3653 function invoke(fn, self, locals){
3654 var args = [],

Callers 1

invokeFunction · 0.85

Calls 1

factoryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…