MCPcopy Index your code
hub / github.com/angular/angular / forEachSingleProvider

Function forEachSingleProvider

packages/core/src/di/r3_injector.ts:725–738  ·  view source on GitHub ↗
(
  providers: Array<Provider | EnvironmentProviders>,
  fn: (provider: SingleProvider) => void,
)

Source from the content-addressed store, hash-verified

723}
724
725function forEachSingleProvider(
726 providers: Array<Provider | EnvironmentProviders>,
727 fn: (provider: SingleProvider) => void,
728): void {
729 for (const provider of providers) {
730 if (Array.isArray(provider)) {
731 forEachSingleProvider(provider, fn);
732 } else if (provider && isEnvironmentProviders(provider)) {
733 forEachSingleProvider(provider.ɵproviders, fn);
734 } else {
735 fn(provider as SingleProvider);
736 }
737 }
738}

Callers 1

constructorMethod · 0.85

Calls 3

isEnvironmentProvidersFunction · 0.90
isArrayMethod · 0.80
fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…