MCPcopy
hub / github.com/nestjs/nest / getById

Method getById

packages/core/injector/modules-container.ts:21–23  ·  view source on GitHub ↗

* Retrieves a module by its identifier. * @param id The identifier of the module to retrieve. * @returns The module instance if found, otherwise undefined.

(id: string)

Source from the content-addressed store, hash-verified

19 * @returns The module instance if found, otherwise undefined.
20 */
21 public getById(id: string): Module | undefined {
22 return Array.from(this.values()).find(moduleRef => moduleRef.id === id);
23 }
24
25 /**
26 * Returns the RPC target registry as an observable.

Callers

nothing calls this directly

Calls 1

findMethod · 0.45

Tested by

no test coverage detected