UNPKG

env-sentinel

Version:

Zero-dependency tool that auto-validates .env files against schema.env, with optional fallback and secure warnings.

18 lines (17 loc) 399 B
export class Registry { core; custom; constructor(coreEntries) { this.core = new Map(coreEntries); this.custom = new Map(); } register(name, item) { this.custom.set(name, item); } get(name) { return this.custom.get(name) || this.core.get(name); } getAll() { return [...this.core.values(), ...this.custom.values()]; } }