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

Function deriveRegion

src/cmap/auth/mongodb_aws.ts:172–179  ·  view source on GitHub ↗
(host: string)

Source from the content-addressed store, hash-verified

170}
171
172function deriveRegion(host: string) {
173 const parts = host.split('.');
174 if (parts.length === 1 || parts[1] === 'amazonaws') {
175 return 'us-east-1';
176 }
177
178 return parts[1];
179}

Callers 1

authMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected