@blackglory/structures 0.10.8 → 0.10.11
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.
- package/README.md +20 -1
- package/dist/es2015/index.min.mjs +2 -2
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +18 -0
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +18 -0
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +2 -2
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +2 -2
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +18 -0
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +18 -0
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +2 -2
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/dynamic-typed-array.d.ts +1 -0
- package/lib/es2015/dynamic-typed-array.js +6 -0
- package/lib/es2015/dynamic-typed-array.js.map +1 -1
- package/lib/es2015/sparse-map.d.ts +2 -0
- package/lib/es2015/sparse-map.js +6 -0
- package/lib/es2015/sparse-map.js.map +1 -1
- package/lib/es2015/typed-sparse-map.d.ts +3 -1
- package/lib/es2015/typed-sparse-map.js +6 -0
- package/lib/es2015/typed-sparse-map.js.map +1 -1
- package/lib/es2018/dynamic-typed-array.d.ts +1 -0
- package/lib/es2018/dynamic-typed-array.js +6 -0
- package/lib/es2018/dynamic-typed-array.js.map +1 -1
- package/lib/es2018/sparse-map.d.ts +2 -0
- package/lib/es2018/sparse-map.js +6 -0
- package/lib/es2018/sparse-map.js.map +1 -1
- package/lib/es2018/typed-sparse-map.d.ts +3 -1
- package/lib/es2018/typed-sparse-map.js +6 -0
- package/lib/es2018/typed-sparse-map.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -229,6 +229,15 @@ Note that `SparseSet` is not faster than JavaScript's built-in `Set` in many cas
|
|
|
229
229
|
```ts
|
|
230
230
|
class SparseMap<T> {
|
|
231
231
|
get [Symbol.toStringTag](): string
|
|
232
|
+
get size(): number
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* `SparseMap` cannot respond to any operations on the internal array,
|
|
236
|
+
* you must ensure that indexes accessed are less than the length of `SparseMap`.
|
|
237
|
+
*
|
|
238
|
+
* Keys do not correspond to indexes of the array.
|
|
239
|
+
*/
|
|
240
|
+
get internalArray(): T[]
|
|
232
241
|
|
|
233
242
|
entries(): IterableIterator<[key: number, value: T]>
|
|
234
243
|
keys(): IterableIterator<number>
|
|
@@ -250,7 +259,7 @@ class DynamicTypedArray<T extends TypedArrayConstructor> {
|
|
|
250
259
|
readonly growthFactor: number
|
|
251
260
|
|
|
252
261
|
/**
|
|
253
|
-
*
|
|
262
|
+
* `DynamicTypedArray` cannot respond to any operations on the internal array,
|
|
254
263
|
* you must ensure that indexes accessed are less than the length of `DynamicTypedArray`.
|
|
255
264
|
*/
|
|
256
265
|
get internalTypedArray(): TypedArrayOfConstructor<T>
|
|
@@ -267,6 +276,7 @@ class DynamicTypedArray<T extends TypedArrayConstructor> {
|
|
|
267
276
|
get(index: number): number | undefined
|
|
268
277
|
push(...values: number[]): void
|
|
269
278
|
pop(): number | undefined
|
|
279
|
+
sort(compare?: (a: number, b: number) => number): void
|
|
270
280
|
}
|
|
271
281
|
```
|
|
272
282
|
|
|
@@ -290,6 +300,15 @@ class TypedSparseSet<T extends UnsignedTypedArrayConstructor> {
|
|
|
290
300
|
```ts
|
|
291
301
|
class TypedSparseMap<T extends TypedArrayConstructor> {
|
|
292
302
|
get [Symbol.toStringTag](): string
|
|
303
|
+
get size(): number
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* `SparseMap` cannot respond to any operations on the internal array,
|
|
307
|
+
* you must ensure that indexes accessed are less than the length of `SparseMap`.
|
|
308
|
+
*
|
|
309
|
+
* Keys do not correspond to indexes of the array.
|
|
310
|
+
*/
|
|
311
|
+
get internalTypedArray(): TypedArrayOfConstructor<T>
|
|
293
312
|
|
|
294
313
|
constructor(array: DynamicTypedArray<T>)
|
|
295
314
|
|