UNPKG

turnilo

Version:

Business intelligence, data exploration and visualization web application for Druid, formerly known as Swiv and Pivot

22 lines 777 B
"use strict"; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; Object.defineProperty(exports, "__esModule", { value: true }); const fs = __importStar(require("fs")); const yaml = __importStar(require("js-yaml")); function loadFileSync(filepath, postProcess) { const fileData = fs.readFileSync(filepath, "utf-8"); switch (postProcess) { case "json": return JSON.parse(fileData); case "yaml": return yaml.load(fileData); } } exports.loadFileSync = loadFileSync; //# sourceMappingURL=file.js.map