UNPKG

@ng-doc/builder

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

21 lines 615 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.loadCache = loadCache; const tslib_1 = require("tslib"); const fs = tslib_1.__importStar(require("fs")); const get_cache_file_path_1 = require("./get-cache-file-path"); /** * Loads cache for given id * @param id */ function loadCache(id) { try { const cacheFilePath = (0, get_cache_file_path_1.getCacheFilePath)(id); const cacheContent = fs.readFileSync(cacheFilePath, 'utf-8'); return JSON.parse(cacheContent); } catch (e) { return {}; } } //# sourceMappingURL=load-cache.js.map