UNPKG

openapi-diff

Version:

A CLI tool to identify differences between Swagger/OpenAPI specs.

22 lines (21 loc) 620 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FileSystem = void 0; const fs = require("fs"); const path = require("path"); class FileSystem { readFile(location) { const filePath = path.resolve(location); return new Promise((resolve, reject) => { fs.readFile(filePath, 'utf8', (error, fileContents) => { if (error) { reject(error); } else { resolve(fileContents.toString()); } }); }); } } exports.FileSystem = FileSystem;