UNPKG

sol-merger

Version:

Merges all import files into single file.

29 lines 975 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ImportsRegistry = void 0; class ImportsRegistry { constructor() { this.registeredImportStatements = []; this.registeredImports = []; } isImportProcessed(importStatement) { if (!importStatement) { return false; } return this.registeredImportStatements.includes(importStatement); } registerImportStatement(importStatement) { this.registeredImportStatements.push(importStatement); } registerImport(i) { this.registeredImports.push(i); } getGlobalImports() { return this.registeredImports.filter((i) => i.globalRename); } isImported(filename, name, as) { return (this.registeredImports.find((ri) => ri.file === filename && ri.name === name && ri.as === as) !== undefined); } } exports.ImportsRegistry = ImportsRegistry; //# sourceMappingURL=importRegistry.js.map