UNPKG

curli-config

Version:

A small library to load/validate configuration files placed in different sides of the application using environments

27 lines (26 loc) 797 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const FilesPathModel_1 = require("./FilesPathModel"); class FilesPathsCollection { constructor(paths) { this.filesPaths = []; this.buildFilesPathsModel(paths); } getPaths() { return this.filesPaths; } buildFilesPathsModel(paths) { if (Array.isArray(paths)) { paths.forEach((pathConfig) => { this.buildFilesPathModel(pathConfig); }); } else { this.buildFilesPathModel(paths); } } buildFilesPathModel(pathConfig) { this.filesPaths.push(new FilesPathModel_1.FilesPathModel(pathConfig.path)); } } exports.FilesPathsCollection = FilesPathsCollection;