Sha256: ce0b3f3a91ea79fd525af09b0470e3760e0bcff9f4f137077bfdeae6ca28a801

Contents?: true

Size: 1.63 KB

Versions: 49

Compression:

Stored size: 1.63 KB

Contents

{"version":3,"file":"Set.js","sourceRoot":"","sources":["../../src/util/Set.ts"],"names":[],"mappings":";AAAA,qBAAqB,QAAQ,CAAC,CAAA;AAa9B;IACE,2DAA2D;IAC3D,kDAAkD;IAClD,MAAM,CAAC;QAAA;YACG,YAAO,GAAQ,EAAE,CAAC;QAmB5B,CAAC;QAjBC,wBAAG,GAAH,UAAI,KAAQ;YACV,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBACrB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;QAED,wBAAG,GAAH,UAAI,KAAQ;YACV,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QAC5C,CAAC;QAED,sBAAI,4BAAI;iBAAR;gBACE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YAC7B,CAAC;;;WAAA;QAED,0BAAK,GAAL;YACE,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QAC1B,CAAC;QACH,iBAAC;IAAD,CAAC,AApBM,GAoBN,CAAC;AACJ,CAAC;AAxBe,sBAAc,iBAwB7B,CAAA;AAEY,WAAG,GAAa,WAAI,CAAC,GAAG,IAAI,cAAc,EAAE,CAAC","sourcesContent":["import { root } from './root';\n\nexport interface ISetCtor {\n  new<T>(): ISet<T>;\n}\n\nexport interface ISet<T> {\n  add(value: T): void;\n  has(value: T): boolean;\n  size: number;\n  clear(): void;\n}\n\nexport function minimalSetImpl<T>(): ISetCtor {\n  // THIS IS NOT a full impl of Set, this is just the minimum\n  // bits of functionality we need for this library.\n  return class MinimalSet<T> implements ISet<T> {\n    private _values: T[] = [];\n\n    add(value: T): void {\n      if (!this.has(value)) {\n        this._values.push(value);\n      }\n    }\n\n    has(value: T): boolean {\n      return this._values.indexOf(value) !== -1;\n    }\n\n    get size(): number {\n      return this._values.length;\n    }\n\n    clear(): void {\n      this._values.length = 0;\n    }\n  };\n}\n\nexport const Set: ISetCtor = root.Set || minimalSetImpl();"]}

Version data entries

49 entries across 49 versions & 4 rubygems

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