@damien-thiesson/typeorm-fixtures-cli
Version:
TypeORM fixtures CLI - Fork with disabled faker in production
19 lines • 558 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.YamlLoader = void 0;
const fs = require("fs");
const path = require("path");
const yaml = require("js-yaml");
class YamlLoader {
constructor() {
this.extensionSupport = ['.yaml', '.yml'];
}
isSupport(filePath) {
return this.extensionSupport.includes(path.extname(filePath));
}
load(filePath) {
return yaml.load(fs.readFileSync(filePath).toString());
}
}
exports.YamlLoader = YamlLoader;
//# sourceMappingURL=YamlLoader.js.map