MCPcopy Create free account
hub / github.com/firebase/firebase-tools / loadCJSON

Function loadCJSON

src/loadCJSON.ts:7–16  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

5 * Loads CJSON from given path.
6 */
7export function loadCJSON(path: string): any {
8 try {
9 return cjson.load(path);
10 } catch (e: any) {
11 if (e.code === "ENOENT") {
12 throw new FirebaseError(`File ${path} does not exist`);
13 }
14 throw new FirebaseError(`Parse Error in ${path}:\n\n${e.message}`);
15 }
16}

Callers 5

loadCJSON.spec.tsFile · 0.90
parseFileMethod · 0.90
loadMethod · 0.90
prepare.tsFile · 0.90
prepareIndexesFunction · 0.90

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…