Sha256: 851f0329ce56832b5871b6960d79523e7820201969adf3575bf06af1ce6465ca
Contents?: true
Size: 596 Bytes
Versions: 49
Compression:
Stored size: 596 Bytes
Contents
export class FastMap { private values: Object = {}; delete(key: string): boolean { this.values[key] = null; return true; } set(key: string, value: any): FastMap { this.values[key] = value; return this; } get(key: string): any { return this.values[key]; } forEach(cb: (value: any, key: any) => void, thisArg?: any): void { const values = this.values; for (let key in values) { if (values.hasOwnProperty(key) && values[key] !== null) { cb.call(thisArg, values[key], key); } } } clear(): void { this.values = {}; } }
Version data entries
49 entries across 49 versions & 4 rubygems