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

Method merge

src/cmap/auth/mongo_credentials.ts:280–291  ·  view source on GitHub ↗
(
    creds: MongoCredentials | undefined,
    options: Partial<MongoCredentialsOptions>
  )

Source from the content-addressed store, hash-verified

278 }
279
280 static merge(
281 creds: MongoCredentials | undefined,
282 options: Partial<MongoCredentialsOptions>
283 ): MongoCredentials {
284 return new MongoCredentials({
285 username: options.username ?? creds?.username ?? '',
286 password: options.password ?? creds?.password ?? '',
287 mechanism: options.mechanism ?? creds?.mechanism ?? AuthMechanism.MONGODB_DEFAULT,
288 mechanismProperties: options.mechanismProperties ?? creds?.mechanismProperties ?? {},
289 source: options.source ?? options.db ?? creds?.source ?? 'admin'
290 });
291 }
292}

Callers 15

jquery.jsFile · 0.45
veFunction · 0.45
xeFunction · 0.45
HeFunction · 0.45
resolveSRVRecordFunction · 0.45
parseOptionsFunction · 0.45
transformFunction · 0.45
jquery.jsFile · 0.45
getAllFunction · 0.45
jquery.min.jsFile · 0.45
mtFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected