1 | var __importDefault = (this && this.__importDefault) || function (mod) {
|
2 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
3 | };
|
4 | (function (factory) {
|
5 | if (typeof module === "object" && typeof module.exports === "object") {
|
6 | var v = factory(require, exports);
|
7 | if (v !== undefined) module.exports = v;
|
8 | }
|
9 | else if (typeof define === "function" && define.amd) {
|
10 | define(["require", "exports", "fs", "./parse"], factory);
|
11 | }
|
12 | })(function (require, exports) {
|
13 | "use strict";
|
14 | Object.defineProperty(exports, "__esModule", { value: true });
|
15 | exports.readFileSync = void 0;
|
16 | var fs_1 = __importDefault(require("fs"));
|
17 | var parse_1 = require("./parse");
|
18 | function readFileSync(aFile) {
|
19 | var contents = fs_1.default.readFileSync(aFile);
|
20 | if (contents.length === 0) {
|
21 | return {};
|
22 | }
|
23 | return (0, parse_1.parse)(contents, aFile);
|
24 | }
|
25 | exports.readFileSync = readFileSync;
|
26 | });
|