MCPcopy
hub / github.com/mongodb/node-mongodb-native / resolveRuntimeAdapters

Function resolveRuntimeAdapters

src/runtime_adapters.ts:53–64  ·  view source on GitHub ↗
(options: MongoClientOptions)

Source from the content-addressed store, hash-verified

51 * not provided by in `options`, and returns a `Runtime`.
52 */
53export function resolveRuntimeAdapters(options: MongoClientOptions): Runtime {
54 (globalThis as any)[ALLOWED_DRIVER_REQUIRE_PROPERTY_NAME] = true;
55 try {
56 const runtime = {
57 // eslint-disable-next-line @typescript-eslint/no-require-imports
58 os: options.runtimeAdapters?.os ?? require('os')
59 };
60 return runtime;
61 } finally {
62 (globalThis as any)[ALLOWED_DRIVER_REQUIRE_PROPERTY_NAME] = false;
63 }
64}

Callers 2

parseOptionsFunction · 0.90
utils.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected