UNPKG

tezx

Version:

TezX is a high-performance, lightweight JavaScript framework designed for speed, scalability, and flexibility. It enables efficient routing, middleware management, and static file serving with minimal configuration. Fully compatible with Node.js, Deno, an

31 lines (30 loc) 586 B
export class State { state; constructor() { this.state = new Map(); } set(key, value) { this.state.set(key, value); } get(key) { return this.state.get(key); } delete(key) { return this.state.delete(key); } has(key) { return this.state.has(key); } keys() { return Array.from(this.state.keys()); } values() { return Array.from(this.state.values()); } entries() { return Array.from(this.state.entries()); } clear() { this.state.clear(); } }