@blackglory/structures 0.10.7 → 0.10.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +9 -2
  2. package/dist/es2015/index.min.mjs +2 -2
  3. package/dist/es2015/index.min.mjs.map +1 -1
  4. package/dist/es2015/index.mjs +20 -0
  5. package/dist/es2015/index.mjs.map +1 -1
  6. package/dist/es2015/index.umd.js +20 -0
  7. package/dist/es2015/index.umd.js.map +1 -1
  8. package/dist/es2015/index.umd.min.js +2 -2
  9. package/dist/es2015/index.umd.min.js.map +1 -1
  10. package/dist/es2018/index.min.mjs +2 -2
  11. package/dist/es2018/index.min.mjs.map +1 -1
  12. package/dist/es2018/index.mjs +20 -0
  13. package/dist/es2018/index.mjs.map +1 -1
  14. package/dist/es2018/index.umd.js +20 -0
  15. package/dist/es2018/index.umd.js.map +1 -1
  16. package/dist/es2018/index.umd.min.js +2 -2
  17. package/dist/es2018/index.umd.min.js.map +1 -1
  18. package/lib/es2015/dynamic-typed-array.d.ts +1 -0
  19. package/lib/es2015/dynamic-typed-array.js +6 -0
  20. package/lib/es2015/dynamic-typed-array.js.map +1 -1
  21. package/lib/es2015/sparse-map.d.ts +1 -0
  22. package/lib/es2015/sparse-map.js +3 -0
  23. package/lib/es2015/sparse-map.js.map +1 -1
  24. package/lib/es2015/sparse-set.d.ts +1 -1
  25. package/lib/es2015/sparse-set.js +4 -0
  26. package/lib/es2015/sparse-set.js.map +1 -1
  27. package/lib/es2015/typed-sparse-map.d.ts +1 -0
  28. package/lib/es2015/typed-sparse-map.js +3 -0
  29. package/lib/es2015/typed-sparse-map.js.map +1 -1
  30. package/lib/es2015/typed-sparse-set.d.ts +1 -1
  31. package/lib/es2015/typed-sparse-set.js +4 -0
  32. package/lib/es2015/typed-sparse-set.js.map +1 -1
  33. package/lib/es2018/dynamic-typed-array.d.ts +1 -0
  34. package/lib/es2018/dynamic-typed-array.js +6 -0
  35. package/lib/es2018/dynamic-typed-array.js.map +1 -1
  36. package/lib/es2018/sparse-map.d.ts +1 -0
  37. package/lib/es2018/sparse-map.js +3 -0
  38. package/lib/es2018/sparse-map.js.map +1 -1
  39. package/lib/es2018/sparse-set.d.ts +1 -1
  40. package/lib/es2018/sparse-set.js +4 -0
  41. package/lib/es2018/sparse-set.js.map +1 -1
  42. package/lib/es2018/typed-sparse-map.d.ts +1 -0
  43. package/lib/es2018/typed-sparse-map.js +3 -0
  44. package/lib/es2018/typed-sparse-map.js.map +1 -1
  45. package/lib/es2018/typed-sparse-set.d.ts +1 -1
  46. package/lib/es2018/typed-sparse-set.js +4 -0
  47. package/lib/es2018/typed-sparse-set.js.map +1 -1
  48. package/package.json +1 -1
package/README.md CHANGED
@@ -219,14 +219,17 @@ class SparseSet implements Iterable<number> {
219
219
 
220
220
  has(value: number): boolean
221
221
  add(value: number): void
222
- delete(value: number): void
222
+ delete(value: number): boolean
223
223
  }
224
224
  ```
225
225
 
226
+ Note that `SparseSet` is not faster than JavaScript's built-in `Set` in many cases.
227
+
226
228
  ### SparseMap
227
229
  ```ts
228
230
  class SparseMap<T> {
229
231
  get [Symbol.toStringTag](): string
232
+ get size(): number
230
233
 
231
234
  entries(): IterableIterator<[key: number, value: T]>
232
235
  keys(): IterableIterator<number>
@@ -265,6 +268,7 @@ class DynamicTypedArray<T extends TypedArrayConstructor> {
265
268
  get(index: number): number | undefined
266
269
  push(...values: number[]): void
267
270
  pop(): number | undefined
271
+ sort(compare?: (a: number, b: number) => number): void
268
272
  }
269
273
  ```
270
274
 
@@ -280,7 +284,7 @@ class TypedSparseSet<T extends UnsignedTypedArrayConstructor> {
280
284
 
281
285
  has(value: number): boolean
282
286
  add(value: number): void
283
- delete(value: number): void
287
+ delete(value: number): boolean
284
288
  }
285
289
  ```
286
290
 
@@ -288,6 +292,7 @@ class TypedSparseSet<T extends UnsignedTypedArrayConstructor> {
288
292
  ```ts
289
293
  class TypedSparseMap<T extends TypedArrayConstructor> {
290
294
  get [Symbol.toStringTag](): string
295
+ get size(): number
291
296
 
292
297
  constructor(array: DynamicTypedArray<T>)
293
298
 
@@ -332,3 +337,5 @@ class BitSet {
332
337
  clear(): void
333
338
  }
334
339
  ```
340
+
341
+ Due to the length of arrays supported by JavaScript, `BitSet` cannot support very large values.