forked from dienianindya/gsi_ess_mobile
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
509 B
17 lines
509 B
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.loadCJSON = void 0;
|
|
const error_1 = require("./error");
|
|
const cjson = require("cjson");
|
|
function loadCJSON(path) {
|
|
try {
|
|
return cjson.load(path);
|
|
}
|
|
catch (e) {
|
|
if (e.code === "ENOENT") {
|
|
throw new error_1.FirebaseError(`File ${path} does not exist`);
|
|
}
|
|
throw new error_1.FirebaseError(`Parse Error in ${path}:\n\n${e.message}`);
|
|
}
|
|
}
|
|
exports.loadCJSON = loadCJSON;
|