@isdk/util 0.3.2 → 0.3.3
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/dist/index.d.mts +464 -1
- package/dist/index.d.ts +464 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/docs/classes/BinarySemaphore.md +418 -0
- package/docs/classes/ConfigFile.md +6 -6
- package/docs/classes/Deque.md +1912 -0
- package/docs/classes/IntSet.md +216 -0
- package/docs/classes/Semaphore.md +538 -0
- package/docs/classes/SignalGate.md +184 -0
- package/docs/functions/RateLimit.md +37 -0
- package/docs/functions/arrayHasAll.md +1 -1
- package/docs/functions/extNameLevel.md +1 -1
- package/docs/functions/filenameReservedRegex.md +1 -1
- package/docs/functions/findPort.md +25 -0
- package/docs/functions/getMultiLevelExtname.md +1 -1
- package/docs/functions/glob.md +1 -1
- package/docs/functions/isStringIn.md +1 -1
- package/docs/functions/isValidFilename.md +1 -1
- package/docs/functions/isValidFilepath.md +1 -1
- package/docs/functions/normalizeIncludeFiles.md +1 -1
- package/docs/functions/parseFrontMatter.md +1 -1
- package/docs/functions/parseYaml.md +1 -1
- package/docs/functions/reControlCharsRegex.md +1 -1
- package/docs/functions/registerYamlTag.md +2 -2
- package/docs/functions/removeLeadingEmptyLines.md +1 -1
- package/docs/functions/sanitizeFilename.md +1 -1
- package/docs/functions/sanitizeFilepath.md +1 -1
- package/docs/functions/sleep.md +36 -0
- package/docs/functions/stringifyYaml.md +1 -1
- package/docs/functions/toCamelCase.md +1 -1
- package/docs/functions/toCapitalCase.md +1 -1
- package/docs/functions/toPascalCase.md +1 -1
- package/docs/functions/traverseFolder.md +1 -1
- package/docs/functions/traverseFolderSync.md +1 -1
- package/docs/functions/yieldExec.md +27 -0
- package/docs/globals.md +17 -0
- package/docs/interfaces/BinarySemaphoreAcquireOptions.md +25 -0
- package/docs/interfaces/BinarySemaphoreOptions.md +57 -0
- package/docs/interfaces/BinarySemaphoreReleaseOptions.md +25 -0
- package/docs/interfaces/BinarySemaphoreReleaserFunc.md +37 -0
- package/docs/interfaces/IncludeFiles.md +3 -3
- package/docs/interfaces/LoadConfigFileOptions.md +3 -3
- package/docs/interfaces/SanitizeFilenameOptions.md +3 -3
- package/docs/interfaces/SemaphoreOptions.md +89 -0
- package/docs/interfaces/SemaphoreTaskItem.md +73 -0
- package/docs/type-aliases/SemaphoreIsReadyFuncType.md +15 -0
- package/docs/type-aliases/StringifyFunc.md +1 -1
- package/docs/type-aliases/TraverseFolderHandler.md +1 -1
- package/docs/type-aliases/TraverseFolderSyncHandler.md +1 -1
- package/docs/variables/DefaultAllTextFiles.md +1 -1
- package/docs/variables/DefaultAsyncSemaphoreCapacity.md +11 -0
- package/docs/variables/FilenameReservedRegex.md +1 -1
- package/docs/variables/WindowsReservedNameRegex.md +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,1912 @@
|
|
|
1
|
+
[**@isdk/util**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/util](../globals.md) / Deque
|
|
6
|
+
|
|
7
|
+
# Class: Deque\<T\>
|
|
8
|
+
|
|
9
|
+
Defined in: [src/deque.ts:31](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L31)
|
|
10
|
+
|
|
11
|
+
## Extends
|
|
12
|
+
|
|
13
|
+
- `Array`\<`T`\>
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
### T
|
|
18
|
+
|
|
19
|
+
`T` = `any`
|
|
20
|
+
|
|
21
|
+
## Indexable
|
|
22
|
+
|
|
23
|
+
\[`n`: `number`\]: `T`
|
|
24
|
+
|
|
25
|
+
## Constructors
|
|
26
|
+
|
|
27
|
+
### Constructor
|
|
28
|
+
|
|
29
|
+
> **new Deque**\<`T`\>(`capacity`?, `disableAutoResize`?): `Deque`\<`T`\>
|
|
30
|
+
|
|
31
|
+
Defined in: [src/deque.ts:37](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L37)
|
|
32
|
+
|
|
33
|
+
#### Parameters
|
|
34
|
+
|
|
35
|
+
##### capacity?
|
|
36
|
+
|
|
37
|
+
`number` | `T`[]
|
|
38
|
+
|
|
39
|
+
##### disableAutoResize?
|
|
40
|
+
|
|
41
|
+
`boolean`
|
|
42
|
+
|
|
43
|
+
#### Returns
|
|
44
|
+
|
|
45
|
+
`Deque`\<`T`\>
|
|
46
|
+
|
|
47
|
+
#### Overrides
|
|
48
|
+
|
|
49
|
+
`Array<T>.constructor`
|
|
50
|
+
|
|
51
|
+
## Properties
|
|
52
|
+
|
|
53
|
+
### \[unscopables\]
|
|
54
|
+
|
|
55
|
+
> `readonly` **\[unscopables\]**: `object`
|
|
56
|
+
|
|
57
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:97
|
|
58
|
+
|
|
59
|
+
Is an object whose properties have the value 'true'
|
|
60
|
+
when they will be absent when used in a 'with' statement.
|
|
61
|
+
|
|
62
|
+
#### Index Signature
|
|
63
|
+
|
|
64
|
+
\[`key`: `number`\]: `undefined` \| `boolean`
|
|
65
|
+
|
|
66
|
+
#### \[iterator\]?
|
|
67
|
+
|
|
68
|
+
> `optional` **\[iterator\]**: `boolean`
|
|
69
|
+
|
|
70
|
+
#### \[unscopables\]?
|
|
71
|
+
|
|
72
|
+
> `readonly` `optional` **\[unscopables\]**: `boolean`
|
|
73
|
+
|
|
74
|
+
Is an object whose properties have the value 'true'
|
|
75
|
+
when they will be absent when used in a 'with' statement.
|
|
76
|
+
|
|
77
|
+
#### at?
|
|
78
|
+
|
|
79
|
+
> `optional` **at**: `boolean`
|
|
80
|
+
|
|
81
|
+
#### concat?
|
|
82
|
+
|
|
83
|
+
> `optional` **concat**: `boolean`
|
|
84
|
+
|
|
85
|
+
#### copyWithin?
|
|
86
|
+
|
|
87
|
+
> `optional` **copyWithin**: `boolean`
|
|
88
|
+
|
|
89
|
+
#### entries?
|
|
90
|
+
|
|
91
|
+
> `optional` **entries**: `boolean`
|
|
92
|
+
|
|
93
|
+
#### every?
|
|
94
|
+
|
|
95
|
+
> `optional` **every**: `boolean`
|
|
96
|
+
|
|
97
|
+
#### fill?
|
|
98
|
+
|
|
99
|
+
> `optional` **fill**: `boolean`
|
|
100
|
+
|
|
101
|
+
#### filter?
|
|
102
|
+
|
|
103
|
+
> `optional` **filter**: `boolean`
|
|
104
|
+
|
|
105
|
+
#### find?
|
|
106
|
+
|
|
107
|
+
> `optional` **find**: `boolean`
|
|
108
|
+
|
|
109
|
+
#### findIndex?
|
|
110
|
+
|
|
111
|
+
> `optional` **findIndex**: `boolean`
|
|
112
|
+
|
|
113
|
+
#### flat?
|
|
114
|
+
|
|
115
|
+
> `optional` **flat**: `boolean`
|
|
116
|
+
|
|
117
|
+
#### flatMap?
|
|
118
|
+
|
|
119
|
+
> `optional` **flatMap**: `boolean`
|
|
120
|
+
|
|
121
|
+
#### forEach?
|
|
122
|
+
|
|
123
|
+
> `optional` **forEach**: `boolean`
|
|
124
|
+
|
|
125
|
+
#### includes?
|
|
126
|
+
|
|
127
|
+
> `optional` **includes**: `boolean`
|
|
128
|
+
|
|
129
|
+
#### indexOf?
|
|
130
|
+
|
|
131
|
+
> `optional` **indexOf**: `boolean`
|
|
132
|
+
|
|
133
|
+
#### join?
|
|
134
|
+
|
|
135
|
+
> `optional` **join**: `boolean`
|
|
136
|
+
|
|
137
|
+
#### keys?
|
|
138
|
+
|
|
139
|
+
> `optional` **keys**: `boolean`
|
|
140
|
+
|
|
141
|
+
#### lastIndexOf?
|
|
142
|
+
|
|
143
|
+
> `optional` **lastIndexOf**: `boolean`
|
|
144
|
+
|
|
145
|
+
#### length?
|
|
146
|
+
|
|
147
|
+
> `optional` **length**: `boolean`
|
|
148
|
+
|
|
149
|
+
Gets or sets the length of the array. This is a number one higher than the highest index in the array.
|
|
150
|
+
|
|
151
|
+
#### map?
|
|
152
|
+
|
|
153
|
+
> `optional` **map**: `boolean`
|
|
154
|
+
|
|
155
|
+
#### pop?
|
|
156
|
+
|
|
157
|
+
> `optional` **pop**: `boolean`
|
|
158
|
+
|
|
159
|
+
#### push?
|
|
160
|
+
|
|
161
|
+
> `optional` **push**: `boolean`
|
|
162
|
+
|
|
163
|
+
#### reduce?
|
|
164
|
+
|
|
165
|
+
> `optional` **reduce**: `boolean`
|
|
166
|
+
|
|
167
|
+
#### reduceRight?
|
|
168
|
+
|
|
169
|
+
> `optional` **reduceRight**: `boolean`
|
|
170
|
+
|
|
171
|
+
#### reverse?
|
|
172
|
+
|
|
173
|
+
> `optional` **reverse**: `boolean`
|
|
174
|
+
|
|
175
|
+
#### shift?
|
|
176
|
+
|
|
177
|
+
> `optional` **shift**: `boolean`
|
|
178
|
+
|
|
179
|
+
#### slice?
|
|
180
|
+
|
|
181
|
+
> `optional` **slice**: `boolean`
|
|
182
|
+
|
|
183
|
+
#### some?
|
|
184
|
+
|
|
185
|
+
> `optional` **some**: `boolean`
|
|
186
|
+
|
|
187
|
+
#### sort?
|
|
188
|
+
|
|
189
|
+
> `optional` **sort**: `boolean`
|
|
190
|
+
|
|
191
|
+
#### splice?
|
|
192
|
+
|
|
193
|
+
> `optional` **splice**: `boolean`
|
|
194
|
+
|
|
195
|
+
#### toLocaleString?
|
|
196
|
+
|
|
197
|
+
> `optional` **toLocaleString**: `boolean`
|
|
198
|
+
|
|
199
|
+
#### toString?
|
|
200
|
+
|
|
201
|
+
> `optional` **toString**: `boolean`
|
|
202
|
+
|
|
203
|
+
#### unshift?
|
|
204
|
+
|
|
205
|
+
> `optional` **unshift**: `boolean`
|
|
206
|
+
|
|
207
|
+
#### values?
|
|
208
|
+
|
|
209
|
+
> `optional` **values**: `boolean`
|
|
210
|
+
|
|
211
|
+
#### Inherited from
|
|
212
|
+
|
|
213
|
+
`Array.[unscopables]`
|
|
214
|
+
|
|
215
|
+
***
|
|
216
|
+
|
|
217
|
+
### length
|
|
218
|
+
|
|
219
|
+
> **length**: `number`
|
|
220
|
+
|
|
221
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1326
|
|
222
|
+
|
|
223
|
+
Gets or sets the length of the array. This is a number one higher than the highest index in the array.
|
|
224
|
+
|
|
225
|
+
#### Inherited from
|
|
226
|
+
|
|
227
|
+
`Array.length`
|
|
228
|
+
|
|
229
|
+
***
|
|
230
|
+
|
|
231
|
+
### \[species\]
|
|
232
|
+
|
|
233
|
+
> `readonly` `static` **\[species\]**: `ArrayConstructor`
|
|
234
|
+
|
|
235
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:316
|
|
236
|
+
|
|
237
|
+
#### Inherited from
|
|
238
|
+
|
|
239
|
+
`Array.[species]`
|
|
240
|
+
|
|
241
|
+
## Accessors
|
|
242
|
+
|
|
243
|
+
### size
|
|
244
|
+
|
|
245
|
+
#### Get Signature
|
|
246
|
+
|
|
247
|
+
> **get** **size**(): `number`
|
|
248
|
+
|
|
249
|
+
Defined in: [src/deque.ts:172](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L172)
|
|
250
|
+
|
|
251
|
+
Gets the number of elements in the deque.
|
|
252
|
+
|
|
253
|
+
##### Example
|
|
254
|
+
|
|
255
|
+
```ts
|
|
256
|
+
const deque = new Deque([1, 2, 3]);
|
|
257
|
+
console.log(deque.size); // 3
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
##### Important
|
|
261
|
+
|
|
262
|
+
Do NOT use the native `Array.length` property. The Deque implementation uses a circular buffer with capacity management, so the native `length` reflects the underlying array capacity, not the actual element count. Always use `size` to get the correct element count.
|
|
263
|
+
|
|
264
|
+
##### Returns
|
|
265
|
+
|
|
266
|
+
`number`
|
|
267
|
+
|
|
268
|
+
The current count of elements in the deque.
|
|
269
|
+
|
|
270
|
+
## Methods
|
|
271
|
+
|
|
272
|
+
### \[iterator\]()
|
|
273
|
+
|
|
274
|
+
> **\[iterator\]**(): `ArrayIterator`\<`T`\>
|
|
275
|
+
|
|
276
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.iterable.d.ts:78
|
|
277
|
+
|
|
278
|
+
Iterator
|
|
279
|
+
|
|
280
|
+
#### Returns
|
|
281
|
+
|
|
282
|
+
`ArrayIterator`\<`T`\>
|
|
283
|
+
|
|
284
|
+
#### Inherited from
|
|
285
|
+
|
|
286
|
+
`Array.[iterator]`
|
|
287
|
+
|
|
288
|
+
***
|
|
289
|
+
|
|
290
|
+
### at()
|
|
291
|
+
|
|
292
|
+
> **at**(`index`): `undefined` \| `T`
|
|
293
|
+
|
|
294
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2022.array.d.ts:24
|
|
295
|
+
|
|
296
|
+
Returns the item located at the specified index.
|
|
297
|
+
|
|
298
|
+
#### Parameters
|
|
299
|
+
|
|
300
|
+
##### index
|
|
301
|
+
|
|
302
|
+
`number`
|
|
303
|
+
|
|
304
|
+
The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
305
|
+
|
|
306
|
+
#### Returns
|
|
307
|
+
|
|
308
|
+
`undefined` \| `T`
|
|
309
|
+
|
|
310
|
+
#### Inherited from
|
|
311
|
+
|
|
312
|
+
`Array.at`
|
|
313
|
+
|
|
314
|
+
***
|
|
315
|
+
|
|
316
|
+
### clear()
|
|
317
|
+
|
|
318
|
+
> **clear**(): `void`
|
|
319
|
+
|
|
320
|
+
Defined in: [src/deque.ts:206](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L206)
|
|
321
|
+
|
|
322
|
+
#### Returns
|
|
323
|
+
|
|
324
|
+
`void`
|
|
325
|
+
|
|
326
|
+
***
|
|
327
|
+
|
|
328
|
+
### concat()
|
|
329
|
+
|
|
330
|
+
#### Call Signature
|
|
331
|
+
|
|
332
|
+
> **concat**(...`items`): `T`[]
|
|
333
|
+
|
|
334
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1350
|
|
335
|
+
|
|
336
|
+
Combines two or more arrays.
|
|
337
|
+
This method returns a new array without modifying any existing arrays.
|
|
338
|
+
|
|
339
|
+
##### Parameters
|
|
340
|
+
|
|
341
|
+
###### items
|
|
342
|
+
|
|
343
|
+
...`ConcatArray`\<`T`\>[]
|
|
344
|
+
|
|
345
|
+
Additional arrays and/or items to add to the end of the array.
|
|
346
|
+
|
|
347
|
+
##### Returns
|
|
348
|
+
|
|
349
|
+
`T`[]
|
|
350
|
+
|
|
351
|
+
##### Inherited from
|
|
352
|
+
|
|
353
|
+
`Array.concat`
|
|
354
|
+
|
|
355
|
+
#### Call Signature
|
|
356
|
+
|
|
357
|
+
> **concat**(...`items`): `T`[]
|
|
358
|
+
|
|
359
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1356
|
|
360
|
+
|
|
361
|
+
Combines two or more arrays.
|
|
362
|
+
This method returns a new array without modifying any existing arrays.
|
|
363
|
+
|
|
364
|
+
##### Parameters
|
|
365
|
+
|
|
366
|
+
###### items
|
|
367
|
+
|
|
368
|
+
...(`T` \| `ConcatArray`\<`T`\>)[]
|
|
369
|
+
|
|
370
|
+
Additional arrays and/or items to add to the end of the array.
|
|
371
|
+
|
|
372
|
+
##### Returns
|
|
373
|
+
|
|
374
|
+
`T`[]
|
|
375
|
+
|
|
376
|
+
##### Inherited from
|
|
377
|
+
|
|
378
|
+
`Array.concat`
|
|
379
|
+
|
|
380
|
+
***
|
|
381
|
+
|
|
382
|
+
### copyWithin()
|
|
383
|
+
|
|
384
|
+
> **copyWithin**(`target`, `start`, `end`?): `this`
|
|
385
|
+
|
|
386
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.core.d.ts:62
|
|
387
|
+
|
|
388
|
+
Returns the this object after copying a section of the array identified by start and end
|
|
389
|
+
to the same array starting at position target
|
|
390
|
+
|
|
391
|
+
#### Parameters
|
|
392
|
+
|
|
393
|
+
##### target
|
|
394
|
+
|
|
395
|
+
`number`
|
|
396
|
+
|
|
397
|
+
If target is negative, it is treated as length+target where length is the
|
|
398
|
+
length of the array.
|
|
399
|
+
|
|
400
|
+
##### start
|
|
401
|
+
|
|
402
|
+
`number`
|
|
403
|
+
|
|
404
|
+
If start is negative, it is treated as length+start. If end is negative, it
|
|
405
|
+
is treated as length+end.
|
|
406
|
+
|
|
407
|
+
##### end?
|
|
408
|
+
|
|
409
|
+
`number`
|
|
410
|
+
|
|
411
|
+
If not specified, length of the this object is used as its default value.
|
|
412
|
+
|
|
413
|
+
#### Returns
|
|
414
|
+
|
|
415
|
+
`this`
|
|
416
|
+
|
|
417
|
+
#### Inherited from
|
|
418
|
+
|
|
419
|
+
`Array.copyWithin`
|
|
420
|
+
|
|
421
|
+
***
|
|
422
|
+
|
|
423
|
+
### entries()
|
|
424
|
+
|
|
425
|
+
> **entries**(): `ArrayIterator`\<\[`number`, `T`\]\>
|
|
426
|
+
|
|
427
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.iterable.d.ts:83
|
|
428
|
+
|
|
429
|
+
Returns an iterable of key, value pairs for every entry in the array
|
|
430
|
+
|
|
431
|
+
#### Returns
|
|
432
|
+
|
|
433
|
+
`ArrayIterator`\<\[`number`, `T`\]\>
|
|
434
|
+
|
|
435
|
+
#### Inherited from
|
|
436
|
+
|
|
437
|
+
`Array.entries`
|
|
438
|
+
|
|
439
|
+
***
|
|
440
|
+
|
|
441
|
+
### every()
|
|
442
|
+
|
|
443
|
+
#### Call Signature
|
|
444
|
+
|
|
445
|
+
> **every**\<`S`\>(`predicate`, `thisArg`?): `this is S[]`
|
|
446
|
+
|
|
447
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1433
|
|
448
|
+
|
|
449
|
+
Determines whether all the members of an array satisfy the specified test.
|
|
450
|
+
|
|
451
|
+
##### Type Parameters
|
|
452
|
+
|
|
453
|
+
###### S
|
|
454
|
+
|
|
455
|
+
`S`
|
|
456
|
+
|
|
457
|
+
##### Parameters
|
|
458
|
+
|
|
459
|
+
###### predicate
|
|
460
|
+
|
|
461
|
+
(`value`, `index`, `array`) => `value is S`
|
|
462
|
+
|
|
463
|
+
A function that accepts up to three arguments. The every method calls
|
|
464
|
+
the predicate function for each element in the array until the predicate returns a value
|
|
465
|
+
which is coercible to the Boolean value false, or until the end of the array.
|
|
466
|
+
|
|
467
|
+
###### thisArg?
|
|
468
|
+
|
|
469
|
+
`any`
|
|
470
|
+
|
|
471
|
+
An object to which the this keyword can refer in the predicate function.
|
|
472
|
+
If thisArg is omitted, undefined is used as the this value.
|
|
473
|
+
|
|
474
|
+
##### Returns
|
|
475
|
+
|
|
476
|
+
`this is S[]`
|
|
477
|
+
|
|
478
|
+
##### Inherited from
|
|
479
|
+
|
|
480
|
+
`Array.every`
|
|
481
|
+
|
|
482
|
+
#### Call Signature
|
|
483
|
+
|
|
484
|
+
> **every**(`predicate`, `thisArg`?): `boolean`
|
|
485
|
+
|
|
486
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1442
|
|
487
|
+
|
|
488
|
+
Determines whether all the members of an array satisfy the specified test.
|
|
489
|
+
|
|
490
|
+
##### Parameters
|
|
491
|
+
|
|
492
|
+
###### predicate
|
|
493
|
+
|
|
494
|
+
(`value`, `index`, `array`) => `unknown`
|
|
495
|
+
|
|
496
|
+
A function that accepts up to three arguments. The every method calls
|
|
497
|
+
the predicate function for each element in the array until the predicate returns a value
|
|
498
|
+
which is coercible to the Boolean value false, or until the end of the array.
|
|
499
|
+
|
|
500
|
+
###### thisArg?
|
|
501
|
+
|
|
502
|
+
`any`
|
|
503
|
+
|
|
504
|
+
An object to which the this keyword can refer in the predicate function.
|
|
505
|
+
If thisArg is omitted, undefined is used as the this value.
|
|
506
|
+
|
|
507
|
+
##### Returns
|
|
508
|
+
|
|
509
|
+
`boolean`
|
|
510
|
+
|
|
511
|
+
##### Inherited from
|
|
512
|
+
|
|
513
|
+
`Array.every`
|
|
514
|
+
|
|
515
|
+
***
|
|
516
|
+
|
|
517
|
+
### fill()
|
|
518
|
+
|
|
519
|
+
> **fill**(`value`, `start`?, `end`?): `this`
|
|
520
|
+
|
|
521
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.core.d.ts:51
|
|
522
|
+
|
|
523
|
+
Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
524
|
+
|
|
525
|
+
#### Parameters
|
|
526
|
+
|
|
527
|
+
##### value
|
|
528
|
+
|
|
529
|
+
`T`
|
|
530
|
+
|
|
531
|
+
value to fill array section with
|
|
532
|
+
|
|
533
|
+
##### start?
|
|
534
|
+
|
|
535
|
+
`number`
|
|
536
|
+
|
|
537
|
+
index to start filling the array at. If start is negative, it is treated as
|
|
538
|
+
length+start where length is the length of the array.
|
|
539
|
+
|
|
540
|
+
##### end?
|
|
541
|
+
|
|
542
|
+
`number`
|
|
543
|
+
|
|
544
|
+
index to stop filling the array at. If end is negative, it is treated as
|
|
545
|
+
length+end.
|
|
546
|
+
|
|
547
|
+
#### Returns
|
|
548
|
+
|
|
549
|
+
`this`
|
|
550
|
+
|
|
551
|
+
#### Inherited from
|
|
552
|
+
|
|
553
|
+
`Array.fill`
|
|
554
|
+
|
|
555
|
+
***
|
|
556
|
+
|
|
557
|
+
### filter()
|
|
558
|
+
|
|
559
|
+
#### Call Signature
|
|
560
|
+
|
|
561
|
+
> **filter**\<`S`\>(`predicate`, `thisArg`?): `S`[]
|
|
562
|
+
|
|
563
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1469
|
|
564
|
+
|
|
565
|
+
Returns the elements of an array that meet the condition specified in a callback function.
|
|
566
|
+
|
|
567
|
+
##### Type Parameters
|
|
568
|
+
|
|
569
|
+
###### S
|
|
570
|
+
|
|
571
|
+
`S`
|
|
572
|
+
|
|
573
|
+
##### Parameters
|
|
574
|
+
|
|
575
|
+
###### predicate
|
|
576
|
+
|
|
577
|
+
(`value`, `index`, `array`) => `value is S`
|
|
578
|
+
|
|
579
|
+
A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
|
|
580
|
+
|
|
581
|
+
###### thisArg?
|
|
582
|
+
|
|
583
|
+
`any`
|
|
584
|
+
|
|
585
|
+
An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
|
586
|
+
|
|
587
|
+
##### Returns
|
|
588
|
+
|
|
589
|
+
`S`[]
|
|
590
|
+
|
|
591
|
+
##### Inherited from
|
|
592
|
+
|
|
593
|
+
`Array.filter`
|
|
594
|
+
|
|
595
|
+
#### Call Signature
|
|
596
|
+
|
|
597
|
+
> **filter**(`predicate`, `thisArg`?): `T`[]
|
|
598
|
+
|
|
599
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1475
|
|
600
|
+
|
|
601
|
+
Returns the elements of an array that meet the condition specified in a callback function.
|
|
602
|
+
|
|
603
|
+
##### Parameters
|
|
604
|
+
|
|
605
|
+
###### predicate
|
|
606
|
+
|
|
607
|
+
(`value`, `index`, `array`) => `unknown`
|
|
608
|
+
|
|
609
|
+
A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
|
|
610
|
+
|
|
611
|
+
###### thisArg?
|
|
612
|
+
|
|
613
|
+
`any`
|
|
614
|
+
|
|
615
|
+
An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
|
616
|
+
|
|
617
|
+
##### Returns
|
|
618
|
+
|
|
619
|
+
`T`[]
|
|
620
|
+
|
|
621
|
+
##### Inherited from
|
|
622
|
+
|
|
623
|
+
`Array.filter`
|
|
624
|
+
|
|
625
|
+
***
|
|
626
|
+
|
|
627
|
+
### find()
|
|
628
|
+
|
|
629
|
+
#### Call Signature
|
|
630
|
+
|
|
631
|
+
> **find**\<`S`\>(`predicate`, `thisArg`?): `undefined` \| `S`
|
|
632
|
+
|
|
633
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.core.d.ts:29
|
|
634
|
+
|
|
635
|
+
Returns the value of the first element in the array where predicate is true, and undefined
|
|
636
|
+
otherwise.
|
|
637
|
+
|
|
638
|
+
##### Type Parameters
|
|
639
|
+
|
|
640
|
+
###### S
|
|
641
|
+
|
|
642
|
+
`S`
|
|
643
|
+
|
|
644
|
+
##### Parameters
|
|
645
|
+
|
|
646
|
+
###### predicate
|
|
647
|
+
|
|
648
|
+
(`value`, `index`, `obj`) => `value is S`
|
|
649
|
+
|
|
650
|
+
find calls predicate once for each element of the array, in ascending
|
|
651
|
+
order, until it finds one where predicate returns true. If such an element is found, find
|
|
652
|
+
immediately returns that element value. Otherwise, find returns undefined.
|
|
653
|
+
|
|
654
|
+
###### thisArg?
|
|
655
|
+
|
|
656
|
+
`any`
|
|
657
|
+
|
|
658
|
+
If provided, it will be used as the this value for each invocation of
|
|
659
|
+
predicate. If it is not provided, undefined is used instead.
|
|
660
|
+
|
|
661
|
+
##### Returns
|
|
662
|
+
|
|
663
|
+
`undefined` \| `S`
|
|
664
|
+
|
|
665
|
+
##### Inherited from
|
|
666
|
+
|
|
667
|
+
`Array.find`
|
|
668
|
+
|
|
669
|
+
#### Call Signature
|
|
670
|
+
|
|
671
|
+
> **find**(`predicate`, `thisArg`?): `undefined` \| `T`
|
|
672
|
+
|
|
673
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.core.d.ts:30
|
|
674
|
+
|
|
675
|
+
##### Parameters
|
|
676
|
+
|
|
677
|
+
###### predicate
|
|
678
|
+
|
|
679
|
+
(`value`, `index`, `obj`) => `unknown`
|
|
680
|
+
|
|
681
|
+
###### thisArg?
|
|
682
|
+
|
|
683
|
+
`any`
|
|
684
|
+
|
|
685
|
+
##### Returns
|
|
686
|
+
|
|
687
|
+
`undefined` \| `T`
|
|
688
|
+
|
|
689
|
+
##### Inherited from
|
|
690
|
+
|
|
691
|
+
`Array.find`
|
|
692
|
+
|
|
693
|
+
***
|
|
694
|
+
|
|
695
|
+
### findIndex()
|
|
696
|
+
|
|
697
|
+
> **findIndex**(`predicate`, `thisArg`?): `number`
|
|
698
|
+
|
|
699
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.core.d.ts:41
|
|
700
|
+
|
|
701
|
+
Returns the index of the first element in the array where predicate is true, and -1
|
|
702
|
+
otherwise.
|
|
703
|
+
|
|
704
|
+
#### Parameters
|
|
705
|
+
|
|
706
|
+
##### predicate
|
|
707
|
+
|
|
708
|
+
(`value`, `index`, `obj`) => `unknown`
|
|
709
|
+
|
|
710
|
+
find calls predicate once for each element of the array, in ascending
|
|
711
|
+
order, until it finds one where predicate returns true. If such an element is found,
|
|
712
|
+
findIndex immediately returns that element index. Otherwise, findIndex returns -1.
|
|
713
|
+
|
|
714
|
+
##### thisArg?
|
|
715
|
+
|
|
716
|
+
`any`
|
|
717
|
+
|
|
718
|
+
If provided, it will be used as the this value for each invocation of
|
|
719
|
+
predicate. If it is not provided, undefined is used instead.
|
|
720
|
+
|
|
721
|
+
#### Returns
|
|
722
|
+
|
|
723
|
+
`number`
|
|
724
|
+
|
|
725
|
+
#### Inherited from
|
|
726
|
+
|
|
727
|
+
`Array.findIndex`
|
|
728
|
+
|
|
729
|
+
***
|
|
730
|
+
|
|
731
|
+
### flat()
|
|
732
|
+
|
|
733
|
+
> **flat**\<`A`, `D`\>(`this`, `depth`?): `FlatArray`\<`A`, `D`\>[]
|
|
734
|
+
|
|
735
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2019.array.d.ts:75
|
|
736
|
+
|
|
737
|
+
Returns a new array with all sub-array elements concatenated into it recursively up to the
|
|
738
|
+
specified depth.
|
|
739
|
+
|
|
740
|
+
#### Type Parameters
|
|
741
|
+
|
|
742
|
+
##### A
|
|
743
|
+
|
|
744
|
+
`A`
|
|
745
|
+
|
|
746
|
+
##### D
|
|
747
|
+
|
|
748
|
+
`D` *extends* `number` = `1`
|
|
749
|
+
|
|
750
|
+
#### Parameters
|
|
751
|
+
|
|
752
|
+
##### this
|
|
753
|
+
|
|
754
|
+
`A`
|
|
755
|
+
|
|
756
|
+
##### depth?
|
|
757
|
+
|
|
758
|
+
`D`
|
|
759
|
+
|
|
760
|
+
The maximum recursion depth
|
|
761
|
+
|
|
762
|
+
#### Returns
|
|
763
|
+
|
|
764
|
+
`FlatArray`\<`A`, `D`\>[]
|
|
765
|
+
|
|
766
|
+
#### Inherited from
|
|
767
|
+
|
|
768
|
+
`Array.flat`
|
|
769
|
+
|
|
770
|
+
***
|
|
771
|
+
|
|
772
|
+
### flatMap()
|
|
773
|
+
|
|
774
|
+
> **flatMap**\<`U`, `This`\>(`callback`, `thisArg`?): `U`[]
|
|
775
|
+
|
|
776
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2019.array.d.ts:64
|
|
777
|
+
|
|
778
|
+
Calls a defined callback function on each element of an array. Then, flattens the result into
|
|
779
|
+
a new array.
|
|
780
|
+
This is identical to a map followed by flat with depth 1.
|
|
781
|
+
|
|
782
|
+
#### Type Parameters
|
|
783
|
+
|
|
784
|
+
##### U
|
|
785
|
+
|
|
786
|
+
`U`
|
|
787
|
+
|
|
788
|
+
##### This
|
|
789
|
+
|
|
790
|
+
`This` = `undefined`
|
|
791
|
+
|
|
792
|
+
#### Parameters
|
|
793
|
+
|
|
794
|
+
##### callback
|
|
795
|
+
|
|
796
|
+
(`this`, `value`, `index`, `array`) => `U` \| readonly `U`[]
|
|
797
|
+
|
|
798
|
+
A function that accepts up to three arguments. The flatMap method calls the
|
|
799
|
+
callback function one time for each element in the array.
|
|
800
|
+
|
|
801
|
+
##### thisArg?
|
|
802
|
+
|
|
803
|
+
`This`
|
|
804
|
+
|
|
805
|
+
An object to which the this keyword can refer in the callback function. If
|
|
806
|
+
thisArg is omitted, undefined is used as the this value.
|
|
807
|
+
|
|
808
|
+
#### Returns
|
|
809
|
+
|
|
810
|
+
`U`[]
|
|
811
|
+
|
|
812
|
+
#### Inherited from
|
|
813
|
+
|
|
814
|
+
`Array.flatMap`
|
|
815
|
+
|
|
816
|
+
***
|
|
817
|
+
|
|
818
|
+
### forEach()
|
|
819
|
+
|
|
820
|
+
> **forEach**(`callbackfn`, `thisArg`?): `void`
|
|
821
|
+
|
|
822
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1457
|
|
823
|
+
|
|
824
|
+
Performs the specified action for each element in an array.
|
|
825
|
+
|
|
826
|
+
#### Parameters
|
|
827
|
+
|
|
828
|
+
##### callbackfn
|
|
829
|
+
|
|
830
|
+
(`value`, `index`, `array`) => `void`
|
|
831
|
+
|
|
832
|
+
A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
|
|
833
|
+
|
|
834
|
+
##### thisArg?
|
|
835
|
+
|
|
836
|
+
`any`
|
|
837
|
+
|
|
838
|
+
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
839
|
+
|
|
840
|
+
#### Returns
|
|
841
|
+
|
|
842
|
+
`void`
|
|
843
|
+
|
|
844
|
+
#### Inherited from
|
|
845
|
+
|
|
846
|
+
`Array.forEach`
|
|
847
|
+
|
|
848
|
+
***
|
|
849
|
+
|
|
850
|
+
### get()
|
|
851
|
+
|
|
852
|
+
> **get**(`index`): `undefined` \| `T`
|
|
853
|
+
|
|
854
|
+
Defined in: [src/deque.ts:176](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L176)
|
|
855
|
+
|
|
856
|
+
#### Parameters
|
|
857
|
+
|
|
858
|
+
##### index
|
|
859
|
+
|
|
860
|
+
`number`
|
|
861
|
+
|
|
862
|
+
#### Returns
|
|
863
|
+
|
|
864
|
+
`undefined` \| `T`
|
|
865
|
+
|
|
866
|
+
***
|
|
867
|
+
|
|
868
|
+
### includes()
|
|
869
|
+
|
|
870
|
+
> **includes**(`searchElement`, `fromIndex`?): `boolean`
|
|
871
|
+
|
|
872
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2016.array.include.d.ts:25
|
|
873
|
+
|
|
874
|
+
Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
875
|
+
|
|
876
|
+
#### Parameters
|
|
877
|
+
|
|
878
|
+
##### searchElement
|
|
879
|
+
|
|
880
|
+
`T`
|
|
881
|
+
|
|
882
|
+
The element to search for.
|
|
883
|
+
|
|
884
|
+
##### fromIndex?
|
|
885
|
+
|
|
886
|
+
`number`
|
|
887
|
+
|
|
888
|
+
The position in this array at which to begin searching for searchElement.
|
|
889
|
+
|
|
890
|
+
#### Returns
|
|
891
|
+
|
|
892
|
+
`boolean`
|
|
893
|
+
|
|
894
|
+
#### Inherited from
|
|
895
|
+
|
|
896
|
+
`Array.includes`
|
|
897
|
+
|
|
898
|
+
***
|
|
899
|
+
|
|
900
|
+
### indexOf()
|
|
901
|
+
|
|
902
|
+
> **indexOf**(`searchElement`, `fromIndex`?): `number`
|
|
903
|
+
|
|
904
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1418
|
|
905
|
+
|
|
906
|
+
Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
|
|
907
|
+
|
|
908
|
+
#### Parameters
|
|
909
|
+
|
|
910
|
+
##### searchElement
|
|
911
|
+
|
|
912
|
+
`T`
|
|
913
|
+
|
|
914
|
+
The value to locate in the array.
|
|
915
|
+
|
|
916
|
+
##### fromIndex?
|
|
917
|
+
|
|
918
|
+
`number`
|
|
919
|
+
|
|
920
|
+
The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
|
|
921
|
+
|
|
922
|
+
#### Returns
|
|
923
|
+
|
|
924
|
+
`number`
|
|
925
|
+
|
|
926
|
+
#### Inherited from
|
|
927
|
+
|
|
928
|
+
`Array.indexOf`
|
|
929
|
+
|
|
930
|
+
***
|
|
931
|
+
|
|
932
|
+
### isEmpty()
|
|
933
|
+
|
|
934
|
+
> **isEmpty**(): `boolean`
|
|
935
|
+
|
|
936
|
+
Defined in: [src/deque.ts:217](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L217)
|
|
937
|
+
|
|
938
|
+
#### Returns
|
|
939
|
+
|
|
940
|
+
`boolean`
|
|
941
|
+
|
|
942
|
+
***
|
|
943
|
+
|
|
944
|
+
### join()
|
|
945
|
+
|
|
946
|
+
> **join**(`separator`?): `string`
|
|
947
|
+
|
|
948
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1361
|
|
949
|
+
|
|
950
|
+
Adds all the elements of an array into a string, separated by the specified separator string.
|
|
951
|
+
|
|
952
|
+
#### Parameters
|
|
953
|
+
|
|
954
|
+
##### separator?
|
|
955
|
+
|
|
956
|
+
`string`
|
|
957
|
+
|
|
958
|
+
A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.
|
|
959
|
+
|
|
960
|
+
#### Returns
|
|
961
|
+
|
|
962
|
+
`string`
|
|
963
|
+
|
|
964
|
+
#### Inherited from
|
|
965
|
+
|
|
966
|
+
`Array.join`
|
|
967
|
+
|
|
968
|
+
***
|
|
969
|
+
|
|
970
|
+
### keys()
|
|
971
|
+
|
|
972
|
+
> **keys**(): `ArrayIterator`\<`number`\>
|
|
973
|
+
|
|
974
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.iterable.d.ts:88
|
|
975
|
+
|
|
976
|
+
Returns an iterable of keys in the array
|
|
977
|
+
|
|
978
|
+
#### Returns
|
|
979
|
+
|
|
980
|
+
`ArrayIterator`\<`number`\>
|
|
981
|
+
|
|
982
|
+
#### Inherited from
|
|
983
|
+
|
|
984
|
+
`Array.keys`
|
|
985
|
+
|
|
986
|
+
***
|
|
987
|
+
|
|
988
|
+
### lastIndexOf()
|
|
989
|
+
|
|
990
|
+
> **lastIndexOf**(`searchElement`, `fromIndex`?): `number`
|
|
991
|
+
|
|
992
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1424
|
|
993
|
+
|
|
994
|
+
Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.
|
|
995
|
+
|
|
996
|
+
#### Parameters
|
|
997
|
+
|
|
998
|
+
##### searchElement
|
|
999
|
+
|
|
1000
|
+
`T`
|
|
1001
|
+
|
|
1002
|
+
The value to locate in the array.
|
|
1003
|
+
|
|
1004
|
+
##### fromIndex?
|
|
1005
|
+
|
|
1006
|
+
`number`
|
|
1007
|
+
|
|
1008
|
+
The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.
|
|
1009
|
+
|
|
1010
|
+
#### Returns
|
|
1011
|
+
|
|
1012
|
+
`number`
|
|
1013
|
+
|
|
1014
|
+
#### Inherited from
|
|
1015
|
+
|
|
1016
|
+
`Array.lastIndexOf`
|
|
1017
|
+
|
|
1018
|
+
***
|
|
1019
|
+
|
|
1020
|
+
### map()
|
|
1021
|
+
|
|
1022
|
+
> **map**\<`U`\>(`callbackfn`, `thisArg`?): `U`[]
|
|
1023
|
+
|
|
1024
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1463
|
|
1025
|
+
|
|
1026
|
+
Calls a defined callback function on each element of an array, and returns an array that contains the results.
|
|
1027
|
+
|
|
1028
|
+
#### Type Parameters
|
|
1029
|
+
|
|
1030
|
+
##### U
|
|
1031
|
+
|
|
1032
|
+
`U`
|
|
1033
|
+
|
|
1034
|
+
#### Parameters
|
|
1035
|
+
|
|
1036
|
+
##### callbackfn
|
|
1037
|
+
|
|
1038
|
+
(`value`, `index`, `array`) => `U`
|
|
1039
|
+
|
|
1040
|
+
A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
|
1041
|
+
|
|
1042
|
+
##### thisArg?
|
|
1043
|
+
|
|
1044
|
+
`any`
|
|
1045
|
+
|
|
1046
|
+
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
1047
|
+
|
|
1048
|
+
#### Returns
|
|
1049
|
+
|
|
1050
|
+
`U`[]
|
|
1051
|
+
|
|
1052
|
+
#### Inherited from
|
|
1053
|
+
|
|
1054
|
+
`Array.map`
|
|
1055
|
+
|
|
1056
|
+
***
|
|
1057
|
+
|
|
1058
|
+
### peekBack()
|
|
1059
|
+
|
|
1060
|
+
> **peekBack**(): `undefined` \| `T`
|
|
1061
|
+
|
|
1062
|
+
Defined in: [src/deque.ts:190](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L190)
|
|
1063
|
+
|
|
1064
|
+
#### Returns
|
|
1065
|
+
|
|
1066
|
+
`undefined` \| `T`
|
|
1067
|
+
|
|
1068
|
+
***
|
|
1069
|
+
|
|
1070
|
+
### peekFront()
|
|
1071
|
+
|
|
1072
|
+
> **peekFront**(): `undefined` \| `T`
|
|
1073
|
+
|
|
1074
|
+
Defined in: [src/deque.ts:199](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L199)
|
|
1075
|
+
|
|
1076
|
+
#### Returns
|
|
1077
|
+
|
|
1078
|
+
`undefined` \| `T`
|
|
1079
|
+
|
|
1080
|
+
***
|
|
1081
|
+
|
|
1082
|
+
### pop()
|
|
1083
|
+
|
|
1084
|
+
> **pop**(`skipNull`?): `undefined` \| `T`
|
|
1085
|
+
|
|
1086
|
+
Defined in: [src/deque.ts:102](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L102)
|
|
1087
|
+
|
|
1088
|
+
Removes and returns the element at the back of the deque.
|
|
1089
|
+
|
|
1090
|
+
#### Parameters
|
|
1091
|
+
|
|
1092
|
+
##### skipNull?
|
|
1093
|
+
|
|
1094
|
+
`boolean`
|
|
1095
|
+
|
|
1096
|
+
When `true`, skips trailing `null`/`undefined` values until a valid element is found or all elements are processed.
|
|
1097
|
+
|
|
1098
|
+
#### Returns
|
|
1099
|
+
|
|
1100
|
+
`undefined` \| `T`
|
|
1101
|
+
|
|
1102
|
+
The removed element, or `undefined` if the deque is empty or all elements are skipped.
|
|
1103
|
+
|
|
1104
|
+
#### Examples
|
|
1105
|
+
|
|
1106
|
+
```ts
|
|
1107
|
+
// Normal pop without skipping
|
|
1108
|
+
const deque = new Deque([1, 2, 3]);
|
|
1109
|
+
deque.pop(); // 3
|
|
1110
|
+
```
|
|
1111
|
+
|
|
1112
|
+
```ts
|
|
1113
|
+
// Skipping null values
|
|
1114
|
+
const nullDeque = new Deque([null, 4, null]);
|
|
1115
|
+
nullDeque.pop(true); // 4
|
|
1116
|
+
nullDeque.pop(true); // undefined (skipped remaining nulls)
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1119
|
+
```ts
|
|
1120
|
+
// Mixed elements with skip
|
|
1121
|
+
const mixedDeque = new Deque([5, null, 6, null]);
|
|
1122
|
+
mixedDeque.pop(true); // 6
|
|
1123
|
+
mixedDeque.pop(false); // null (explicitly not skipping)
|
|
1124
|
+
```
|
|
1125
|
+
|
|
1126
|
+
#### Overrides
|
|
1127
|
+
|
|
1128
|
+
`Array.pop`
|
|
1129
|
+
|
|
1130
|
+
***
|
|
1131
|
+
|
|
1132
|
+
### push()
|
|
1133
|
+
|
|
1134
|
+
> **push**(`item`): `number`
|
|
1135
|
+
|
|
1136
|
+
Defined in: [src/deque.ts:52](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L52)
|
|
1137
|
+
|
|
1138
|
+
Appends new elements to the end of an array, and returns the new length of the array.
|
|
1139
|
+
|
|
1140
|
+
#### Parameters
|
|
1141
|
+
|
|
1142
|
+
##### item
|
|
1143
|
+
|
|
1144
|
+
`T`
|
|
1145
|
+
|
|
1146
|
+
#### Returns
|
|
1147
|
+
|
|
1148
|
+
`number`
|
|
1149
|
+
|
|
1150
|
+
#### Overrides
|
|
1151
|
+
|
|
1152
|
+
`Array.push`
|
|
1153
|
+
|
|
1154
|
+
***
|
|
1155
|
+
|
|
1156
|
+
### reduce()
|
|
1157
|
+
|
|
1158
|
+
#### Call Signature
|
|
1159
|
+
|
|
1160
|
+
> **reduce**(`callbackfn`): `T`
|
|
1161
|
+
|
|
1162
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1481
|
|
1163
|
+
|
|
1164
|
+
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
1165
|
+
|
|
1166
|
+
##### Parameters
|
|
1167
|
+
|
|
1168
|
+
###### callbackfn
|
|
1169
|
+
|
|
1170
|
+
(`previousValue`, `currentValue`, `currentIndex`, `array`) => `T`
|
|
1171
|
+
|
|
1172
|
+
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
|
1173
|
+
|
|
1174
|
+
##### Returns
|
|
1175
|
+
|
|
1176
|
+
`T`
|
|
1177
|
+
|
|
1178
|
+
##### Inherited from
|
|
1179
|
+
|
|
1180
|
+
`Array.reduce`
|
|
1181
|
+
|
|
1182
|
+
#### Call Signature
|
|
1183
|
+
|
|
1184
|
+
> **reduce**(`callbackfn`, `initialValue`): `T`
|
|
1185
|
+
|
|
1186
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1482
|
|
1187
|
+
|
|
1188
|
+
##### Parameters
|
|
1189
|
+
|
|
1190
|
+
###### callbackfn
|
|
1191
|
+
|
|
1192
|
+
(`previousValue`, `currentValue`, `currentIndex`, `array`) => `T`
|
|
1193
|
+
|
|
1194
|
+
###### initialValue
|
|
1195
|
+
|
|
1196
|
+
`T`
|
|
1197
|
+
|
|
1198
|
+
##### Returns
|
|
1199
|
+
|
|
1200
|
+
`T`
|
|
1201
|
+
|
|
1202
|
+
##### Inherited from
|
|
1203
|
+
|
|
1204
|
+
`Array.reduce`
|
|
1205
|
+
|
|
1206
|
+
#### Call Signature
|
|
1207
|
+
|
|
1208
|
+
> **reduce**\<`U`\>(`callbackfn`, `initialValue`): `U`
|
|
1209
|
+
|
|
1210
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1488
|
|
1211
|
+
|
|
1212
|
+
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
1213
|
+
|
|
1214
|
+
##### Type Parameters
|
|
1215
|
+
|
|
1216
|
+
###### U
|
|
1217
|
+
|
|
1218
|
+
`U`
|
|
1219
|
+
|
|
1220
|
+
##### Parameters
|
|
1221
|
+
|
|
1222
|
+
###### callbackfn
|
|
1223
|
+
|
|
1224
|
+
(`previousValue`, `currentValue`, `currentIndex`, `array`) => `U`
|
|
1225
|
+
|
|
1226
|
+
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
|
1227
|
+
|
|
1228
|
+
###### initialValue
|
|
1229
|
+
|
|
1230
|
+
`U`
|
|
1231
|
+
|
|
1232
|
+
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
1233
|
+
|
|
1234
|
+
##### Returns
|
|
1235
|
+
|
|
1236
|
+
`U`
|
|
1237
|
+
|
|
1238
|
+
##### Inherited from
|
|
1239
|
+
|
|
1240
|
+
`Array.reduce`
|
|
1241
|
+
|
|
1242
|
+
***
|
|
1243
|
+
|
|
1244
|
+
### reduceRight()
|
|
1245
|
+
|
|
1246
|
+
#### Call Signature
|
|
1247
|
+
|
|
1248
|
+
> **reduceRight**(`callbackfn`): `T`
|
|
1249
|
+
|
|
1250
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1494
|
|
1251
|
+
|
|
1252
|
+
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
1253
|
+
|
|
1254
|
+
##### Parameters
|
|
1255
|
+
|
|
1256
|
+
###### callbackfn
|
|
1257
|
+
|
|
1258
|
+
(`previousValue`, `currentValue`, `currentIndex`, `array`) => `T`
|
|
1259
|
+
|
|
1260
|
+
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
|
1261
|
+
|
|
1262
|
+
##### Returns
|
|
1263
|
+
|
|
1264
|
+
`T`
|
|
1265
|
+
|
|
1266
|
+
##### Inherited from
|
|
1267
|
+
|
|
1268
|
+
`Array.reduceRight`
|
|
1269
|
+
|
|
1270
|
+
#### Call Signature
|
|
1271
|
+
|
|
1272
|
+
> **reduceRight**(`callbackfn`, `initialValue`): `T`
|
|
1273
|
+
|
|
1274
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1495
|
|
1275
|
+
|
|
1276
|
+
##### Parameters
|
|
1277
|
+
|
|
1278
|
+
###### callbackfn
|
|
1279
|
+
|
|
1280
|
+
(`previousValue`, `currentValue`, `currentIndex`, `array`) => `T`
|
|
1281
|
+
|
|
1282
|
+
###### initialValue
|
|
1283
|
+
|
|
1284
|
+
`T`
|
|
1285
|
+
|
|
1286
|
+
##### Returns
|
|
1287
|
+
|
|
1288
|
+
`T`
|
|
1289
|
+
|
|
1290
|
+
##### Inherited from
|
|
1291
|
+
|
|
1292
|
+
`Array.reduceRight`
|
|
1293
|
+
|
|
1294
|
+
#### Call Signature
|
|
1295
|
+
|
|
1296
|
+
> **reduceRight**\<`U`\>(`callbackfn`, `initialValue`): `U`
|
|
1297
|
+
|
|
1298
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1501
|
|
1299
|
+
|
|
1300
|
+
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
1301
|
+
|
|
1302
|
+
##### Type Parameters
|
|
1303
|
+
|
|
1304
|
+
###### U
|
|
1305
|
+
|
|
1306
|
+
`U`
|
|
1307
|
+
|
|
1308
|
+
##### Parameters
|
|
1309
|
+
|
|
1310
|
+
###### callbackfn
|
|
1311
|
+
|
|
1312
|
+
(`previousValue`, `currentValue`, `currentIndex`, `array`) => `U`
|
|
1313
|
+
|
|
1314
|
+
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
|
|
1315
|
+
|
|
1316
|
+
###### initialValue
|
|
1317
|
+
|
|
1318
|
+
`U`
|
|
1319
|
+
|
|
1320
|
+
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
1321
|
+
|
|
1322
|
+
##### Returns
|
|
1323
|
+
|
|
1324
|
+
`U`
|
|
1325
|
+
|
|
1326
|
+
##### Inherited from
|
|
1327
|
+
|
|
1328
|
+
`Array.reduceRight`
|
|
1329
|
+
|
|
1330
|
+
***
|
|
1331
|
+
|
|
1332
|
+
### removeAt()
|
|
1333
|
+
|
|
1334
|
+
> **removeAt**(`index`): `undefined` \| `T`
|
|
1335
|
+
|
|
1336
|
+
Defined in: [src/deque.ts:226](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L226)
|
|
1337
|
+
|
|
1338
|
+
Removes the element at the specified index.
|
|
1339
|
+
|
|
1340
|
+
#### Parameters
|
|
1341
|
+
|
|
1342
|
+
##### index
|
|
1343
|
+
|
|
1344
|
+
`number`
|
|
1345
|
+
|
|
1346
|
+
Logical index position (0 represents the front, length-1 represents the back)
|
|
1347
|
+
|
|
1348
|
+
#### Returns
|
|
1349
|
+
|
|
1350
|
+
`undefined` \| `T`
|
|
1351
|
+
|
|
1352
|
+
The removed element
|
|
1353
|
+
|
|
1354
|
+
***
|
|
1355
|
+
|
|
1356
|
+
### reverse()
|
|
1357
|
+
|
|
1358
|
+
> **reverse**(): `T`[]
|
|
1359
|
+
|
|
1360
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1366
|
|
1361
|
+
|
|
1362
|
+
Reverses the elements in an array in place.
|
|
1363
|
+
This method mutates the array and returns a reference to the same array.
|
|
1364
|
+
|
|
1365
|
+
#### Returns
|
|
1366
|
+
|
|
1367
|
+
`T`[]
|
|
1368
|
+
|
|
1369
|
+
#### Inherited from
|
|
1370
|
+
|
|
1371
|
+
`Array.reverse`
|
|
1372
|
+
|
|
1373
|
+
***
|
|
1374
|
+
|
|
1375
|
+
### shift()
|
|
1376
|
+
|
|
1377
|
+
> **shift**(`skipNull`?): `undefined` \| `T`
|
|
1378
|
+
|
|
1379
|
+
Defined in: [src/deque.ts:142](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L142)
|
|
1380
|
+
|
|
1381
|
+
Removes and returns the element at the front of the deque.
|
|
1382
|
+
|
|
1383
|
+
#### Parameters
|
|
1384
|
+
|
|
1385
|
+
##### skipNull?
|
|
1386
|
+
|
|
1387
|
+
`boolean`
|
|
1388
|
+
|
|
1389
|
+
When `true`, skips leading `null`/`undefined` values until a valid element is found or all elements are processed.
|
|
1390
|
+
|
|
1391
|
+
#### Returns
|
|
1392
|
+
|
|
1393
|
+
`undefined` \| `T`
|
|
1394
|
+
|
|
1395
|
+
The removed element, or `undefined` if the deque is empty or all elements are skipped.
|
|
1396
|
+
|
|
1397
|
+
#### Examples
|
|
1398
|
+
|
|
1399
|
+
```ts
|
|
1400
|
+
// Normal shift without skipping
|
|
1401
|
+
const deque = new Deque([1, 2, 3]);
|
|
1402
|
+
deque.shift(); // 1
|
|
1403
|
+
```
|
|
1404
|
+
|
|
1405
|
+
```ts
|
|
1406
|
+
// Skipping null values
|
|
1407
|
+
const nullDeque = new Deque([null, 4, null]);
|
|
1408
|
+
nullDeque.shift(true); // 4
|
|
1409
|
+
nullDeque.shift(true); // undefined (skipped remaining nulls)
|
|
1410
|
+
```
|
|
1411
|
+
|
|
1412
|
+
```ts
|
|
1413
|
+
// Mixed elements with skip
|
|
1414
|
+
const mixedDeque = new Deque([null, 5, null, 6]);
|
|
1415
|
+
mixedDeque.shift(true); // 5
|
|
1416
|
+
mixedDeque.shift(false); // null (explicitly not skipping)
|
|
1417
|
+
```
|
|
1418
|
+
|
|
1419
|
+
#### Overrides
|
|
1420
|
+
|
|
1421
|
+
`Array.shift`
|
|
1422
|
+
|
|
1423
|
+
***
|
|
1424
|
+
|
|
1425
|
+
### slice()
|
|
1426
|
+
|
|
1427
|
+
> **slice**(`start`?, `end`?): `T`[]
|
|
1428
|
+
|
|
1429
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1381
|
|
1430
|
+
|
|
1431
|
+
Returns a copy of a section of an array.
|
|
1432
|
+
For both start and end, a negative index can be used to indicate an offset from the end of the array.
|
|
1433
|
+
For example, -2 refers to the second to last element of the array.
|
|
1434
|
+
|
|
1435
|
+
#### Parameters
|
|
1436
|
+
|
|
1437
|
+
##### start?
|
|
1438
|
+
|
|
1439
|
+
`number`
|
|
1440
|
+
|
|
1441
|
+
The beginning index of the specified portion of the array.
|
|
1442
|
+
If start is undefined, then the slice begins at index 0.
|
|
1443
|
+
|
|
1444
|
+
##### end?
|
|
1445
|
+
|
|
1446
|
+
`number`
|
|
1447
|
+
|
|
1448
|
+
The end index of the specified portion of the array. This is exclusive of the element at the index 'end'.
|
|
1449
|
+
If end is undefined, then the slice extends to the end of the array.
|
|
1450
|
+
|
|
1451
|
+
#### Returns
|
|
1452
|
+
|
|
1453
|
+
`T`[]
|
|
1454
|
+
|
|
1455
|
+
#### Inherited from
|
|
1456
|
+
|
|
1457
|
+
`Array.slice`
|
|
1458
|
+
|
|
1459
|
+
***
|
|
1460
|
+
|
|
1461
|
+
### some()
|
|
1462
|
+
|
|
1463
|
+
> **some**(`predicate`, `thisArg`?): `boolean`
|
|
1464
|
+
|
|
1465
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1451
|
|
1466
|
+
|
|
1467
|
+
Determines whether the specified callback function returns true for any element of an array.
|
|
1468
|
+
|
|
1469
|
+
#### Parameters
|
|
1470
|
+
|
|
1471
|
+
##### predicate
|
|
1472
|
+
|
|
1473
|
+
(`value`, `index`, `array`) => `unknown`
|
|
1474
|
+
|
|
1475
|
+
A function that accepts up to three arguments. The some method calls
|
|
1476
|
+
the predicate function for each element in the array until the predicate returns a value
|
|
1477
|
+
which is coercible to the Boolean value true, or until the end of the array.
|
|
1478
|
+
|
|
1479
|
+
##### thisArg?
|
|
1480
|
+
|
|
1481
|
+
`any`
|
|
1482
|
+
|
|
1483
|
+
An object to which the this keyword can refer in the predicate function.
|
|
1484
|
+
If thisArg is omitted, undefined is used as the this value.
|
|
1485
|
+
|
|
1486
|
+
#### Returns
|
|
1487
|
+
|
|
1488
|
+
`boolean`
|
|
1489
|
+
|
|
1490
|
+
#### Inherited from
|
|
1491
|
+
|
|
1492
|
+
`Array.some`
|
|
1493
|
+
|
|
1494
|
+
***
|
|
1495
|
+
|
|
1496
|
+
### sort()
|
|
1497
|
+
|
|
1498
|
+
> **sort**(`compareFn`?): `this`
|
|
1499
|
+
|
|
1500
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1392
|
|
1501
|
+
|
|
1502
|
+
Sorts an array in place.
|
|
1503
|
+
This method mutates the array and returns a reference to the same array.
|
|
1504
|
+
|
|
1505
|
+
#### Parameters
|
|
1506
|
+
|
|
1507
|
+
##### compareFn?
|
|
1508
|
+
|
|
1509
|
+
(`a`, `b`) => `number`
|
|
1510
|
+
|
|
1511
|
+
Function used to determine the order of the elements. It is expected to return
|
|
1512
|
+
a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
1513
|
+
value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order.
|
|
1514
|
+
```ts
|
|
1515
|
+
[11,2,22,1].sort((a, b) => a - b)
|
|
1516
|
+
```
|
|
1517
|
+
|
|
1518
|
+
#### Returns
|
|
1519
|
+
|
|
1520
|
+
`this`
|
|
1521
|
+
|
|
1522
|
+
#### Inherited from
|
|
1523
|
+
|
|
1524
|
+
`Array.sort`
|
|
1525
|
+
|
|
1526
|
+
***
|
|
1527
|
+
|
|
1528
|
+
### splice()
|
|
1529
|
+
|
|
1530
|
+
#### Call Signature
|
|
1531
|
+
|
|
1532
|
+
> **splice**(`start`, `deleteCount`?): `T`[]
|
|
1533
|
+
|
|
1534
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1399
|
|
1535
|
+
|
|
1536
|
+
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
|
1537
|
+
|
|
1538
|
+
##### Parameters
|
|
1539
|
+
|
|
1540
|
+
###### start
|
|
1541
|
+
|
|
1542
|
+
`number`
|
|
1543
|
+
|
|
1544
|
+
The zero-based location in the array from which to start removing elements.
|
|
1545
|
+
|
|
1546
|
+
###### deleteCount?
|
|
1547
|
+
|
|
1548
|
+
`number`
|
|
1549
|
+
|
|
1550
|
+
The number of elements to remove.
|
|
1551
|
+
|
|
1552
|
+
##### Returns
|
|
1553
|
+
|
|
1554
|
+
`T`[]
|
|
1555
|
+
|
|
1556
|
+
An array containing the elements that were deleted.
|
|
1557
|
+
|
|
1558
|
+
##### Inherited from
|
|
1559
|
+
|
|
1560
|
+
`Array.splice`
|
|
1561
|
+
|
|
1562
|
+
#### Call Signature
|
|
1563
|
+
|
|
1564
|
+
> **splice**(`start`, `deleteCount`, ...`items`): `T`[]
|
|
1565
|
+
|
|
1566
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1407
|
|
1567
|
+
|
|
1568
|
+
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
|
1569
|
+
|
|
1570
|
+
##### Parameters
|
|
1571
|
+
|
|
1572
|
+
###### start
|
|
1573
|
+
|
|
1574
|
+
`number`
|
|
1575
|
+
|
|
1576
|
+
The zero-based location in the array from which to start removing elements.
|
|
1577
|
+
|
|
1578
|
+
###### deleteCount
|
|
1579
|
+
|
|
1580
|
+
`number`
|
|
1581
|
+
|
|
1582
|
+
The number of elements to remove.
|
|
1583
|
+
|
|
1584
|
+
###### items
|
|
1585
|
+
|
|
1586
|
+
...`T`[]
|
|
1587
|
+
|
|
1588
|
+
Elements to insert into the array in place of the deleted elements.
|
|
1589
|
+
|
|
1590
|
+
##### Returns
|
|
1591
|
+
|
|
1592
|
+
`T`[]
|
|
1593
|
+
|
|
1594
|
+
An array containing the elements that were deleted.
|
|
1595
|
+
|
|
1596
|
+
##### Inherited from
|
|
1597
|
+
|
|
1598
|
+
`Array.splice`
|
|
1599
|
+
|
|
1600
|
+
***
|
|
1601
|
+
|
|
1602
|
+
### toLocaleString()
|
|
1603
|
+
|
|
1604
|
+
#### Call Signature
|
|
1605
|
+
|
|
1606
|
+
> **toLocaleString**(): `string`
|
|
1607
|
+
|
|
1608
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1334
|
|
1609
|
+
|
|
1610
|
+
Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
|
|
1611
|
+
|
|
1612
|
+
##### Returns
|
|
1613
|
+
|
|
1614
|
+
`string`
|
|
1615
|
+
|
|
1616
|
+
##### Inherited from
|
|
1617
|
+
|
|
1618
|
+
`Array.toLocaleString`
|
|
1619
|
+
|
|
1620
|
+
#### Call Signature
|
|
1621
|
+
|
|
1622
|
+
> **toLocaleString**(`locales`, `options`?): `string`
|
|
1623
|
+
|
|
1624
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.core.d.ts:64
|
|
1625
|
+
|
|
1626
|
+
##### Parameters
|
|
1627
|
+
|
|
1628
|
+
###### locales
|
|
1629
|
+
|
|
1630
|
+
`string` | `string`[]
|
|
1631
|
+
|
|
1632
|
+
###### options?
|
|
1633
|
+
|
|
1634
|
+
`NumberFormatOptions` & `DateTimeFormatOptions`
|
|
1635
|
+
|
|
1636
|
+
##### Returns
|
|
1637
|
+
|
|
1638
|
+
`string`
|
|
1639
|
+
|
|
1640
|
+
##### Inherited from
|
|
1641
|
+
|
|
1642
|
+
`Array.toLocaleString`
|
|
1643
|
+
|
|
1644
|
+
***
|
|
1645
|
+
|
|
1646
|
+
### toString()
|
|
1647
|
+
|
|
1648
|
+
> **toString**(): `string`
|
|
1649
|
+
|
|
1650
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1330
|
|
1651
|
+
|
|
1652
|
+
Returns a string representation of an array.
|
|
1653
|
+
|
|
1654
|
+
#### Returns
|
|
1655
|
+
|
|
1656
|
+
`string`
|
|
1657
|
+
|
|
1658
|
+
#### Inherited from
|
|
1659
|
+
|
|
1660
|
+
`Array.toString`
|
|
1661
|
+
|
|
1662
|
+
***
|
|
1663
|
+
|
|
1664
|
+
### unshift()
|
|
1665
|
+
|
|
1666
|
+
> **unshift**(`item`): `number`
|
|
1667
|
+
|
|
1668
|
+
Defined in: [src/deque.ts:65](https://github.com/isdk/util.js/blob/f6ac1e1b241d01211870dd55d000c1e9d4daa404/src/deque.ts#L65)
|
|
1669
|
+
|
|
1670
|
+
Inserts new elements at the start of an array, and returns the new length of the array.
|
|
1671
|
+
|
|
1672
|
+
#### Parameters
|
|
1673
|
+
|
|
1674
|
+
##### item
|
|
1675
|
+
|
|
1676
|
+
`T`
|
|
1677
|
+
|
|
1678
|
+
#### Returns
|
|
1679
|
+
|
|
1680
|
+
`number`
|
|
1681
|
+
|
|
1682
|
+
#### Overrides
|
|
1683
|
+
|
|
1684
|
+
`Array.unshift`
|
|
1685
|
+
|
|
1686
|
+
***
|
|
1687
|
+
|
|
1688
|
+
### values()
|
|
1689
|
+
|
|
1690
|
+
> **values**(): `ArrayIterator`\<`T`\>
|
|
1691
|
+
|
|
1692
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.iterable.d.ts:93
|
|
1693
|
+
|
|
1694
|
+
Returns an iterable of values in the array
|
|
1695
|
+
|
|
1696
|
+
#### Returns
|
|
1697
|
+
|
|
1698
|
+
`ArrayIterator`\<`T`\>
|
|
1699
|
+
|
|
1700
|
+
#### Inherited from
|
|
1701
|
+
|
|
1702
|
+
`Array.values`
|
|
1703
|
+
|
|
1704
|
+
***
|
|
1705
|
+
|
|
1706
|
+
### from()
|
|
1707
|
+
|
|
1708
|
+
#### Call Signature
|
|
1709
|
+
|
|
1710
|
+
> `static` **from**\<`T`\>(`arrayLike`): `T`[]
|
|
1711
|
+
|
|
1712
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.core.d.ts:72
|
|
1713
|
+
|
|
1714
|
+
Creates an array from an array-like object.
|
|
1715
|
+
|
|
1716
|
+
##### Type Parameters
|
|
1717
|
+
|
|
1718
|
+
###### T
|
|
1719
|
+
|
|
1720
|
+
`T`
|
|
1721
|
+
|
|
1722
|
+
##### Parameters
|
|
1723
|
+
|
|
1724
|
+
###### arrayLike
|
|
1725
|
+
|
|
1726
|
+
`ArrayLike`\<`T`\>
|
|
1727
|
+
|
|
1728
|
+
An array-like object to convert to an array.
|
|
1729
|
+
|
|
1730
|
+
##### Returns
|
|
1731
|
+
|
|
1732
|
+
`T`[]
|
|
1733
|
+
|
|
1734
|
+
##### Inherited from
|
|
1735
|
+
|
|
1736
|
+
`Array.from`
|
|
1737
|
+
|
|
1738
|
+
#### Call Signature
|
|
1739
|
+
|
|
1740
|
+
> `static` **from**\<`T`, `U`\>(`arrayLike`, `mapfn`, `thisArg`?): `U`[]
|
|
1741
|
+
|
|
1742
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.core.d.ts:80
|
|
1743
|
+
|
|
1744
|
+
Creates an array from an iterable object.
|
|
1745
|
+
|
|
1746
|
+
##### Type Parameters
|
|
1747
|
+
|
|
1748
|
+
###### T
|
|
1749
|
+
|
|
1750
|
+
`T`
|
|
1751
|
+
|
|
1752
|
+
###### U
|
|
1753
|
+
|
|
1754
|
+
`U`
|
|
1755
|
+
|
|
1756
|
+
##### Parameters
|
|
1757
|
+
|
|
1758
|
+
###### arrayLike
|
|
1759
|
+
|
|
1760
|
+
`ArrayLike`\<`T`\>
|
|
1761
|
+
|
|
1762
|
+
An array-like object to convert to an array.
|
|
1763
|
+
|
|
1764
|
+
###### mapfn
|
|
1765
|
+
|
|
1766
|
+
(`v`, `k`) => `U`
|
|
1767
|
+
|
|
1768
|
+
A mapping function to call on every element of the array.
|
|
1769
|
+
|
|
1770
|
+
###### thisArg?
|
|
1771
|
+
|
|
1772
|
+
`any`
|
|
1773
|
+
|
|
1774
|
+
Value of 'this' used to invoke the mapfn.
|
|
1775
|
+
|
|
1776
|
+
##### Returns
|
|
1777
|
+
|
|
1778
|
+
`U`[]
|
|
1779
|
+
|
|
1780
|
+
##### Inherited from
|
|
1781
|
+
|
|
1782
|
+
`Array.from`
|
|
1783
|
+
|
|
1784
|
+
#### Call Signature
|
|
1785
|
+
|
|
1786
|
+
> `static` **from**\<`T`\>(`iterable`): `T`[]
|
|
1787
|
+
|
|
1788
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.iterable.d.ts:101
|
|
1789
|
+
|
|
1790
|
+
Creates an array from an iterable object.
|
|
1791
|
+
|
|
1792
|
+
##### Type Parameters
|
|
1793
|
+
|
|
1794
|
+
###### T
|
|
1795
|
+
|
|
1796
|
+
`T`
|
|
1797
|
+
|
|
1798
|
+
##### Parameters
|
|
1799
|
+
|
|
1800
|
+
###### iterable
|
|
1801
|
+
|
|
1802
|
+
An iterable object to convert to an array.
|
|
1803
|
+
|
|
1804
|
+
`Iterable`\<`T`, `any`, `any`\> | `ArrayLike`\<`T`\>
|
|
1805
|
+
|
|
1806
|
+
##### Returns
|
|
1807
|
+
|
|
1808
|
+
`T`[]
|
|
1809
|
+
|
|
1810
|
+
##### Inherited from
|
|
1811
|
+
|
|
1812
|
+
`Array.from`
|
|
1813
|
+
|
|
1814
|
+
#### Call Signature
|
|
1815
|
+
|
|
1816
|
+
> `static` **from**\<`T`, `U`\>(`iterable`, `mapfn`, `thisArg`?): `U`[]
|
|
1817
|
+
|
|
1818
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.iterable.d.ts:109
|
|
1819
|
+
|
|
1820
|
+
Creates an array from an iterable object.
|
|
1821
|
+
|
|
1822
|
+
##### Type Parameters
|
|
1823
|
+
|
|
1824
|
+
###### T
|
|
1825
|
+
|
|
1826
|
+
`T`
|
|
1827
|
+
|
|
1828
|
+
###### U
|
|
1829
|
+
|
|
1830
|
+
`U`
|
|
1831
|
+
|
|
1832
|
+
##### Parameters
|
|
1833
|
+
|
|
1834
|
+
###### iterable
|
|
1835
|
+
|
|
1836
|
+
An iterable object to convert to an array.
|
|
1837
|
+
|
|
1838
|
+
`Iterable`\<`T`, `any`, `any`\> | `ArrayLike`\<`T`\>
|
|
1839
|
+
|
|
1840
|
+
###### mapfn
|
|
1841
|
+
|
|
1842
|
+
(`v`, `k`) => `U`
|
|
1843
|
+
|
|
1844
|
+
A mapping function to call on every element of the array.
|
|
1845
|
+
|
|
1846
|
+
###### thisArg?
|
|
1847
|
+
|
|
1848
|
+
`any`
|
|
1849
|
+
|
|
1850
|
+
Value of 'this' used to invoke the mapfn.
|
|
1851
|
+
|
|
1852
|
+
##### Returns
|
|
1853
|
+
|
|
1854
|
+
`U`[]
|
|
1855
|
+
|
|
1856
|
+
##### Inherited from
|
|
1857
|
+
|
|
1858
|
+
`Array.from`
|
|
1859
|
+
|
|
1860
|
+
***
|
|
1861
|
+
|
|
1862
|
+
### isArray()
|
|
1863
|
+
|
|
1864
|
+
> `static` **isArray**(`arg`): `arg is any[]`
|
|
1865
|
+
|
|
1866
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1513
|
|
1867
|
+
|
|
1868
|
+
#### Parameters
|
|
1869
|
+
|
|
1870
|
+
##### arg
|
|
1871
|
+
|
|
1872
|
+
`any`
|
|
1873
|
+
|
|
1874
|
+
#### Returns
|
|
1875
|
+
|
|
1876
|
+
`arg is any[]`
|
|
1877
|
+
|
|
1878
|
+
#### Inherited from
|
|
1879
|
+
|
|
1880
|
+
`Array.isArray`
|
|
1881
|
+
|
|
1882
|
+
***
|
|
1883
|
+
|
|
1884
|
+
### of()
|
|
1885
|
+
|
|
1886
|
+
> `static` **of**\<`T`\>(...`items`): `T`[]
|
|
1887
|
+
|
|
1888
|
+
Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2015.core.d.ts:86
|
|
1889
|
+
|
|
1890
|
+
Returns a new array from a set of elements.
|
|
1891
|
+
|
|
1892
|
+
#### Type Parameters
|
|
1893
|
+
|
|
1894
|
+
##### T
|
|
1895
|
+
|
|
1896
|
+
`T`
|
|
1897
|
+
|
|
1898
|
+
#### Parameters
|
|
1899
|
+
|
|
1900
|
+
##### items
|
|
1901
|
+
|
|
1902
|
+
...`T`[]
|
|
1903
|
+
|
|
1904
|
+
A set of elements to include in the new array object.
|
|
1905
|
+
|
|
1906
|
+
#### Returns
|
|
1907
|
+
|
|
1908
|
+
`T`[]
|
|
1909
|
+
|
|
1910
|
+
#### Inherited from
|
|
1911
|
+
|
|
1912
|
+
`Array.of`
|