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

Version Path
ilog-0.4.1 node_modules/rxjs/src/util/FastMap.ts
ilog-0.4.0 node_modules/rxjs/src/util/FastMap.ts
ilog-0.3.3 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-18.0.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.21.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.20.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.19.1 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.19.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.18.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.17.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.16.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.15.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.14.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.13.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.12.2 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.12.1 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.12.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.11.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.10.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-17.9.0 node_modules/rxjs/src/util/FastMap.ts