UNPKG

unfire

Version:

⚡️ Utilities for Firebase 🔥 built with Composition API, Typescript and ❤️

11 lines (10 loc) 447 B
// src/firebase/firestore-schema.ts var schemaMap = `__firestoreSchema__`; var ImportFirestoreSchemaByPath = async (path) => { var _a, _b; const resolvedPath = path.includes("/") ? path.split("/").map((subPath, index) => index % 2 === 0 ? subPath : "{id}").join("/") : path; return (_b = await ((_a = schemaMap[resolvedPath]) == null ? void 0 : _a.call(schemaMap))) == null ? void 0 : _b.schema; }; export { ImportFirestoreSchemaByPath };