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
govuk_publishing_components-16.21.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-16.20.1 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-16.20.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-16.19.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-16.18.0 node_modules/rxjs/src/util/FastMap.ts
govuk_publishing_components-16.17.0 node_modules/rxjs/src/util/FastMap.ts
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/inquirer/node_modules/rxjs/src/util/FastMap.ts
locomotivecms-3.4.0 app/javascript/node_modules/rxjs/src/util/FastMap.ts
dragonfly_puppeteer-0.1.0 node_modules/rxjs/src/util/FastMap.ts