openapi-diff
Version:
A CLI tool to identify differences between Swagger/OpenAPI specs.
21 lines (20 loc) • 591 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
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;