INNER CODE UNIT · TypeScript

getHostsOfMongoURI

aliez-ren/mongood · src/utils/index.ts:27

export function getHostsOfMongoURI(uri?: string): string[] {
  if (!uri) {
    return []
  }
  const parsed = mongodbUri.parse(uri)
  return parsed.hosts.map((h) => (h.port ? `${h.host}:${h.port}` : h.host))
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…