UNPKG

typeorm-fixtures-cli

Version:

[![CircleCI](https://circleci.com/gh/RobinCK/typeorm-fixtures.svg?style=svg)](https://circleci.com/gh/RobinCK/typeorm-fixtures) ![GitHub CI](https://github.com/RobinCK/typeorm-fixtures/workflows/Build%20CI/badge.svg?branch=master) [![OpenCollective](https

19 lines 558 B
"use strict"; 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