UNPKG

@zero-scripts/core

Version:

Framework for creating presets, configurations and extensions

35 lines 827 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ScriptsMap = void 0; class ScriptsMap { constructor() { this.map = new Map(); } get size() { return this.map.size; } get(key) { return this.map.get(key); } has(key) { return this.map.has(key); } set(key, value) { if (this.has(key)) { throw new Error(`[${this.constructor.name}] Cannot override script (${key})`); } this.map.set(key, value); return this; } entries() { return this.map.entries(); } keys() { return this.map.keys(); } values() { return this.map.values(); } } exports.ScriptsMap = ScriptsMap; //# sourceMappingURL=ScriptsMap.js.map