Initial import NDC_1C

This commit is contained in:
2026-03-26 10:38:25 +03:00
commit a162d77ef7
2943 changed files with 3615871 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ensureDir = ensureDir;
exports.readJsonFile = readJsonFile;
exports.writeJsonFile = writeJsonFile;
const fs_1 = __importDefault(require("fs"));
function ensureDir(path) {
if (!fs_1.default.existsSync(path)) {
fs_1.default.mkdirSync(path, { recursive: true });
}
}
function readJsonFile(path, fallback) {
try {
const raw = fs_1.default.readFileSync(path, "utf-8");
return JSON.parse(raw);
}
catch {
return fallback;
}
}
function writeJsonFile(path, value) {
fs_1.default.writeFileSync(path, JSON.stringify(value, null, 2), "utf-8");
}