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

18 lines 518 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.JsonLoader = void 0; const path = require("path"); const fs = require("fs"); class JsonLoader { constructor() { this.extensionSupport = ['.json']; } isSupport(filePath) { return this.extensionSupport.includes(path.extname(filePath)); } load(filePath) { return JSON.parse(fs.readFileSync(filePath).toString()); } } exports.JsonLoader = JsonLoader; //# sourceMappingURL=JsonLoader.js.map