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

Function extractAuthFromConnectionString

test/tools/utils.ts:245–252  ·  view source on GitHub ↗
(connectionString: string | any[])

Source from the content-addressed store, hash-verified

243}
244
245export function extractAuthFromConnectionString(connectionString: string | any[]) {
246 const indices = getIndicesOfAuthInUrl(connectionString);
247 if (!indices) {
248 return null;
249 }
250
251 return connectionString.slice(indices.start, indices.end);
252}
253
254export interface FailPoint {
255 configureFailPoint: 'failCommand' | 'failGetMoreAfterCursorCheckout' | 'maxTimeNeverTimeOut';

Callers 2

setupMethod · 0.85
resolveConnectionStringFunction · 0.85

Calls 1

getIndicesOfAuthInUrlFunction · 0.85

Tested by

no test coverage detected