mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 07:02:28 +03:00
8 lines
198 B
TypeScript
8 lines
198 B
TypeScript
// Loaded from https://deno.land/x/mongo@v0.20.0/src/utils/ns.ts
|
|
|
|
|
|
export function parseNamespace(ns: string) {
|
|
const [db, ...rest] = ns.split(".");
|
|
return { db, collection: rest.join(".") };
|
|
}
|