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

Function getEnvironmentalOptions

test/tools/utils.ts:154–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152}
153
154export function getEnvironmentalOptions(): ReturnType<typeof getTLSOptions> &
155 Pick<MongoClientOptions, 'serverApi'> {
156 const options: ReturnType<typeof getEnvironmentalOptions> = {};
157
158 if (process.env.MONGODB_API_VERSION) {
159 options.serverApi = { version: process.env.MONGODB_API_VERSION as ServerApiVersion };
160 }
161
162 return {
163 ...options,
164 ...getTLSOptions()
165 };
166}
167
168/**
169 * Use as a template string tag to stringify objects in the template string

Callers 4

newClientMethod · 0.90
testConfigBeforeHookFunction · 0.90
getClientFunction · 0.90
constructorMethod · 0.90

Calls 1

getTLSOptionsFunction · 0.85

Tested by

no test coverage detected