data-structure-typed 2.6.1 → 2.6.2

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 (116) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/cjs/binary-tree.cjs +2927 -23688
  3. package/dist/cjs/graph.cjs +845 -2634
  4. package/dist/cjs/hash.cjs +185 -616
  5. package/dist/cjs/heap.cjs +266 -818
  6. package/dist/cjs/index.cjs +5116 -31358
  7. package/dist/cjs/linked-list.cjs +644 -2615
  8. package/dist/cjs/matrix.cjs +220 -535
  9. package/dist/cjs/priority-queue.cjs +266 -818
  10. package/dist/cjs/queue.cjs +637 -2343
  11. package/dist/cjs/stack.cjs +124 -530
  12. package/dist/cjs/trie.cjs +145 -592
  13. package/dist/cjs-legacy/binary-tree.cjs +4352 -25113
  14. package/dist/cjs-legacy/graph.cjs +847 -2636
  15. package/dist/cjs-legacy/hash.cjs +181 -612
  16. package/dist/cjs-legacy/heap.cjs +266 -818
  17. package/dist/cjs-legacy/index.cjs +6657 -32899
  18. package/dist/cjs-legacy/linked-list.cjs +640 -2611
  19. package/dist/cjs-legacy/matrix.cjs +220 -535
  20. package/dist/cjs-legacy/priority-queue.cjs +266 -818
  21. package/dist/cjs-legacy/queue.cjs +634 -2340
  22. package/dist/cjs-legacy/stack.cjs +124 -530
  23. package/dist/cjs-legacy/trie.cjs +145 -592
  24. package/dist/esm/binary-tree.mjs +2927 -23688
  25. package/dist/esm/graph.mjs +845 -2634
  26. package/dist/esm/hash.mjs +185 -616
  27. package/dist/esm/heap.mjs +266 -818
  28. package/dist/esm/index.mjs +5116 -31358
  29. package/dist/esm/linked-list.mjs +644 -2615
  30. package/dist/esm/matrix.mjs +220 -535
  31. package/dist/esm/priority-queue.mjs +266 -818
  32. package/dist/esm/queue.mjs +637 -2343
  33. package/dist/esm/stack.mjs +124 -530
  34. package/dist/esm/trie.mjs +145 -592
  35. package/dist/esm-legacy/binary-tree.mjs +4352 -25113
  36. package/dist/esm-legacy/graph.mjs +847 -2636
  37. package/dist/esm-legacy/hash.mjs +181 -612
  38. package/dist/esm-legacy/heap.mjs +266 -818
  39. package/dist/esm-legacy/index.mjs +6657 -32899
  40. package/dist/esm-legacy/linked-list.mjs +640 -2611
  41. package/dist/esm-legacy/matrix.mjs +220 -535
  42. package/dist/esm-legacy/priority-queue.mjs +266 -818
  43. package/dist/esm-legacy/queue.mjs +634 -2340
  44. package/dist/esm-legacy/stack.mjs +124 -530
  45. package/dist/esm-legacy/trie.mjs +145 -592
  46. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +29 -500
  47. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +38 -563
  48. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +230 -1212
  49. package/dist/types/data-structures/binary-tree/bst.d.ts +124 -1063
  50. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +99 -854
  51. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +62 -314
  52. package/dist/types/data-structures/binary-tree/tree-map.d.ts +366 -5057
  53. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +277 -4885
  54. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +253 -3929
  55. package/dist/types/data-structures/binary-tree/tree-set.d.ts +261 -4782
  56. package/dist/types/data-structures/graph/abstract-graph.d.ts +44 -44
  57. package/dist/types/data-structures/graph/directed-graph.d.ts +130 -527
  58. package/dist/types/data-structures/graph/undirected-graph.d.ts +125 -482
  59. package/dist/types/data-structures/hash/hash-map.d.ts +132 -562
  60. package/dist/types/data-structures/heap/heap.d.ts +194 -746
  61. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +120 -809
  62. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +121 -733
  63. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +193 -863
  64. package/dist/types/data-structures/matrix/matrix.d.ts +159 -474
  65. package/dist/types/data-structures/priority-queue/max-priority-queue.d.ts +1 -6
  66. package/dist/types/data-structures/priority-queue/min-priority-queue.d.ts +6 -11
  67. package/dist/types/data-structures/priority-queue/priority-queue.d.ts +1 -1
  68. package/dist/types/data-structures/queue/deque.d.ts +196 -804
  69. package/dist/types/data-structures/queue/queue.d.ts +99 -585
  70. package/dist/types/data-structures/stack/stack.d.ts +75 -481
  71. package/dist/types/data-structures/trie/trie.d.ts +98 -584
  72. package/dist/umd/data-structure-typed.js +6580 -32822
  73. package/dist/umd/data-structure-typed.min.js +3 -3
  74. package/docs-site-docusaurus/docs/api/classes/AVLTree.md +162 -215
  75. package/docs-site-docusaurus/docs/api/classes/AVLTreeNode.md +9 -9
  76. package/docs-site-docusaurus/docs/api/classes/AbstractGraph.md +47 -47
  77. package/docs-site-docusaurus/docs/api/classes/BST.md +155 -208
  78. package/docs-site-docusaurus/docs/api/classes/BSTNode.md +7 -7
  79. package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +13 -29
  80. package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +104 -158
  81. package/docs-site-docusaurus/docs/api/classes/BinaryTreeNode.md +13 -13
  82. package/docs-site-docusaurus/docs/api/classes/Deque.md +72 -104
  83. package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +60 -80
  84. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +67 -101
  85. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedListNode.md +6 -6
  86. package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +9 -9
  87. package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +1 -1
  88. package/docs-site-docusaurus/docs/api/classes/HashMap.md +52 -48
  89. package/docs-site-docusaurus/docs/api/classes/Heap.md +40 -68
  90. package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +17 -17
  91. package/docs-site-docusaurus/docs/api/classes/LinearBase.md +38 -38
  92. package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +45 -45
  93. package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +23 -23
  94. package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +68 -96
  95. package/docs-site-docusaurus/docs/api/classes/MapGraph.md +60 -80
  96. package/docs-site-docusaurus/docs/api/classes/Matrix.md +57 -52
  97. package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +38 -66
  98. package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +41 -74
  99. package/docs-site-docusaurus/docs/api/classes/MinHeap.md +38 -66
  100. package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +46 -79
  101. package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +40 -68
  102. package/docs-site-docusaurus/docs/api/classes/Queue.md +54 -78
  103. package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +171 -225
  104. package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +10 -22
  105. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +68 -98
  106. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedListNode.md +4 -4
  107. package/docs-site-docusaurus/docs/api/classes/SkipList.md +98 -75
  108. package/docs-site-docusaurus/docs/api/classes/Stack.md +33 -53
  109. package/docs-site-docusaurus/docs/api/classes/TreeMap.md +104 -129
  110. package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +57 -124
  111. package/docs-site-docusaurus/docs/api/classes/TreeSet.md +45 -116
  112. package/docs-site-docusaurus/docs/api/classes/Trie.md +37 -61
  113. package/docs-site-docusaurus/docs/api/classes/TrieNode.md +8 -8
  114. package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +59 -77
  115. package/package.json +1 -1
  116. package/src/data-structures/binary-tree/tree-multi-set.ts +15 -11
@@ -218,63 +218,21 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
218
218
  * @remarks Time O(L), Space O(L)
219
219
  * @param word - Word to insert.
220
220
  * @returns True if the word was newly added.
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
- * @example
264
- * // basic Trie creation and add words
265
- * // Create a simple Trie with initial words
266
- * const trie = new Trie(['apple', 'app', 'apply']);
267
- *
268
- * // Verify size
269
- * console.log(trie.size); // 3;
270
- *
271
- * // Check if words exist
272
- * console.log(trie.has('apple')); // true;
273
- * console.log(trie.has('app')); // true;
274
- *
275
- * // Add a new word
276
- * trie.add('application');
277
- * console.log(trie.size); // 4;
221
+ * @example
222
+ * // basic Trie creation and add words
223
+ * // Create a simple Trie with initial words
224
+ * const trie = new Trie(['apple', 'app', 'apply']);
225
+ *
226
+ * // Verify size
227
+ * console.log(trie.size); // 3;
228
+ *
229
+ * // Check if words exist
230
+ * console.log(trie.has('apple')); // true;
231
+ * console.log(trie.has('app')); // true;
232
+ *
233
+ * // Add a new word
234
+ * trie.add('application');
235
+ * console.log(trie.size); // 4;
278
236
  */
279
237
  add(word: string): boolean;
280
238
  /**
@@ -282,52 +240,13 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
282
240
  * @remarks Time O(ΣL), Space O(ΣL)
283
241
  * @param words - Iterable of strings (or raw records if toElementFn is provided).
284
242
  * @returns Array of per-word 'added' flags.
285
-
286
-
287
-
288
-
289
-
290
-
291
-
292
-
293
-
294
-
295
-
296
-
297
-
298
-
299
-
300
-
301
-
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
-
317
-
318
-
319
-
320
-
321
-
322
-
323
-
324
- * @example
325
- * // Add multiple words
326
- * const trie = new Trie();
327
- * trie.addMany(['cat', 'car', 'card']);
328
- * console.log(trie.has('cat')); // true;
329
- * console.log(trie.has('car')); // true;
330
- * console.log(trie.size); // 3;
243
+ * @example
244
+ * // Add multiple words
245
+ * const trie = new Trie();
246
+ * trie.addMany(['cat', 'car', 'card']);
247
+ * console.log(trie.has('cat')); // true;
248
+ * console.log(trie.has('car')); // true;
249
+ * console.log(trie.size); // 3;
331
250
  */
332
251
  addMany(words: Iterable<string> | Iterable<R>): boolean[];
333
252
  /**
@@ -335,156 +254,36 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
335
254
  * @remarks Time O(L), Space O(1)
336
255
  * @param word - Word to search for.
337
256
  * @returns True if present.
338
-
339
-
340
-
341
-
342
-
343
-
344
-
345
-
346
-
347
-
348
-
349
-
350
-
351
-
352
-
353
-
354
-
355
-
356
-
357
-
358
-
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
-
376
-
377
-
378
-
379
-
380
- * @example
381
- * // Check if a word exists
382
- * const dict = new Trie(['apple', 'app', 'application']);
383
- *
384
- * console.log(dict.has('app')); // true;
385
- * console.log(dict.has('apple')); // true;
386
- * console.log(dict.has('ap')); // false;
257
+ * @example
258
+ * // Check if a word exists
259
+ * const dict = new Trie(['apple', 'app', 'application']);
260
+ *
261
+ * console.log(dict.has('app')); // true;
262
+ * console.log(dict.has('apple')); // true;
263
+ * console.log(dict.has('ap')); // false;
387
264
  */
388
265
  has(word: string): boolean;
389
266
  /**
390
267
  * Check whether the trie is empty.
391
268
  * @remarks Time O(1), Space O(1)
392
269
  * @returns True if size is 0.
393
-
394
-
395
-
396
-
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
-
411
-
412
-
413
-
414
-
415
-
416
-
417
-
418
-
419
-
420
-
421
-
422
-
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
-
431
-
432
- * @example
433
- * // Check if empty
434
- * const trie = new Trie();
435
- * console.log(trie.isEmpty()); // true;
436
- * trie.add('word');
437
- * console.log(trie.isEmpty()); // false;
270
+ * @example
271
+ * // Check if empty
272
+ * const trie = new Trie();
273
+ * console.log(trie.isEmpty()); // true;
274
+ * trie.add('word');
275
+ * console.log(trie.isEmpty()); // false;
438
276
  */
439
277
  isEmpty(): boolean;
440
278
  /**
441
279
  * Remove all words and reset to a fresh root.
442
280
  * @remarks Time O(1), Space O(1)
443
281
  * @returns void
444
-
445
-
446
-
447
-
448
-
449
-
450
-
451
-
452
-
453
-
454
-
455
-
456
-
457
-
458
-
459
-
460
-
461
-
462
-
463
-
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
-
472
-
473
-
474
-
475
-
476
-
477
-
478
-
479
-
480
-
481
-
482
-
483
- * @example
484
- * // Remove all words
485
- * const trie = new Trie(['a', 'b', 'c']);
486
- * trie.clear();
487
- * console.log(trie.isEmpty()); // true;
282
+ * @example
283
+ * // Remove all words
284
+ * const trie = new Trie(['a', 'b', 'c']);
285
+ * trie.clear();
286
+ * console.log(trie.isEmpty()); // true;
488
287
  */
489
288
  clear(): void;
490
289
  /**
@@ -492,65 +291,23 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
492
291
  * @remarks Time O(L), Space O(1)
493
292
  * @param word - Word to delete.
494
293
  * @returns True if a word was removed.
495
-
496
-
497
-
498
-
499
-
500
-
501
-
502
-
503
-
504
-
505
-
506
-
507
-
508
-
509
-
510
-
511
-
512
-
513
-
514
-
515
-
516
-
517
-
518
-
519
-
520
-
521
-
522
-
523
-
524
-
525
-
526
-
527
-
528
-
529
-
530
-
531
-
532
-
533
-
534
-
535
-
536
-
537
- * @example
538
- * // Trie delete and iteration
539
- * const trie = new Trie(['car', 'card', 'care', 'careful', 'can', 'cat']);
540
- *
541
- * // Delete a word
542
- * trie.delete('card');
543
- * console.log(trie.has('card')); // false;
544
- *
545
- * // Word with same prefix still exists
546
- * console.log(trie.has('care')); // true;
547
- *
548
- * // Size decreased
549
- * console.log(trie.size); // 5;
550
- *
551
- * // Iterate through all words
552
- * const allWords = [...trie];
553
- * console.log(allWords.length); // 5;
294
+ * @example
295
+ * // Trie delete and iteration
296
+ * const trie = new Trie(['car', 'card', 'care', 'careful', 'can', 'cat']);
297
+ *
298
+ * // Delete a word
299
+ * trie.delete('card');
300
+ * console.log(trie.has('card')); // false;
301
+ *
302
+ * // Word with same prefix still exists
303
+ * console.log(trie.has('care')); // true;
304
+ *
305
+ * // Size decreased
306
+ * console.log(trie.size); // 5;
307
+ *
308
+ * // Iterate through all words
309
+ * const allWords = [...trie];
310
+ * console.log(allWords.length); // 5;
554
311
  */
555
312
  delete(word: string): boolean;
556
313
  /**
@@ -571,55 +328,13 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
571
328
  * @remarks Time O(L), Space O(1)
572
329
  * @param input - String to test as prefix.
573
330
  * @returns True if input matches a path from root.
574
-
575
-
576
-
577
-
578
-
579
-
580
-
581
-
582
-
583
-
584
-
585
-
586
-
587
-
588
-
589
-
590
-
591
-
592
-
593
-
594
-
595
-
596
-
597
-
598
-
599
-
600
-
601
-
602
-
603
-
604
-
605
-
606
-
607
-
608
-
609
-
610
-
611
-
612
-
613
-
614
-
615
-
616
- * @example
617
- * // Check if a prefix exists
618
- * const trie = new Trie(['hello', 'help', 'world']);
619
- *
620
- * console.log(trie.hasPrefix('hel')); // true;
621
- * console.log(trie.hasPrefix('wor')); // true;
622
- * console.log(trie.hasPrefix('xyz')); // false;
331
+ * @example
332
+ * // Check if a prefix exists
333
+ * const trie = new Trie(['hello', 'help', 'world']);
334
+ *
335
+ * console.log(trie.hasPrefix('hel')); // true;
336
+ * console.log(trie.hasPrefix('wor')); // true;
337
+ * console.log(trie.hasPrefix('xyz')); // false;
623
338
  */
624
339
  hasPrefix(input: string): boolean;
625
340
  /**
@@ -633,53 +348,11 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
633
348
  * Return the longest common prefix among all words.
634
349
  * @remarks Time O(H), Space O(1)
635
350
  * @returns The longest common prefix string.
636
-
637
-
638
-
639
-
640
-
641
-
642
-
643
-
644
-
645
-
646
-
647
-
648
-
649
-
650
-
651
-
652
-
653
-
654
-
655
-
656
-
657
-
658
-
659
-
660
-
661
-
662
-
663
-
664
-
665
-
666
-
667
-
668
-
669
-
670
-
671
-
672
-
673
-
674
-
675
-
676
-
677
-
678
- * @example
679
- * // Find shared prefix
680
- * const trie = new Trie(['flower', 'flow', 'flight']);
681
- *
682
- * console.log(trie.getLongestCommonPrefix()); // 'fl';
351
+ * @example
352
+ * // Find shared prefix
353
+ * const trie = new Trie(['flower', 'flow', 'flight']);
354
+ *
355
+ * console.log(trie.getLongestCommonPrefix()); // 'fl';
683
356
  */
684
357
  getLongestCommonPrefix(): string;
685
358
  /**
@@ -689,110 +362,29 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
689
362
  * @param [max] - Maximum number of words to return; default is Number.MAX_SAFE_INTEGER.
690
363
  * @param [isAllWhenEmptyPrefix] - When true, collect from root even if prefix is empty.
691
364
  * @returns Array of collected words (at most max).
692
-
693
-
694
-
695
-
696
-
697
-
698
-
699
-
700
-
701
-
702
-
703
-
704
-
705
-
706
-
707
-
708
-
709
-
710
-
711
-
712
-
713
-
714
-
715
-
716
-
717
-
718
-
719
-
720
-
721
-
722
-
723
-
724
-
725
-
726
-
727
-
728
-
729
-
730
-
731
-
732
-
733
-
734
- * @example
735
- * // Trie getWords and prefix search
736
- * const trie = new Trie(['apple', 'app', 'apply', 'application', 'apricot']);
737
- *
738
- * // Get all words with prefix 'app'
739
- * const appWords = trie.getWords('app');
740
- * console.log(appWords); // contains 'app';
741
- * console.log(appWords); // contains 'apple';
742
- * console.log(appWords); // contains 'apply';
743
- * console.log(appWords); // contains 'application';
744
- * expect(appWords).not.toContain('apricot');
365
+ * @example
366
+ * // Trie getWords and prefix search
367
+ * const trie = new Trie(['apple', 'app', 'apply', 'application', 'apricot']);
368
+ *
369
+ * // Get all words with prefix 'app'
370
+ * const appWords = trie.getWords('app');
371
+ * console.log(appWords); // contains 'app';
372
+ * console.log(appWords); // contains 'apple';
373
+ * console.log(appWords); // contains 'apply';
374
+ * console.log(appWords); // contains 'application';
375
+ * expect(appWords).not.toContain('apricot');
745
376
  */
746
377
  getWords(prefix?: string, max?: number, isAllWhenEmptyPrefix?: boolean): string[];
747
378
  /**
748
379
  * Deep clone this trie by iterating and inserting all words.
749
380
  * @remarks Time O(ΣL), Space O(ΣL)
750
381
  * @returns A new trie with the same words and options.
751
-
752
-
753
-
754
-
755
-
756
-
757
-
758
-
759
-
760
-
761
-
762
-
763
-
764
-
765
-
766
-
767
-
768
-
769
-
770
-
771
-
772
-
773
-
774
-
775
-
776
-
777
-
778
-
779
-
780
-
781
-
782
-
783
-
784
-
785
-
786
-
787
-
788
-
789
-
790
- * @example
791
- * // Create independent copy
792
- * const trie = new Trie(['hello', 'world']);
793
- * const copy = trie.clone();
794
- * copy.delete('hello');
795
- * console.log(trie.has('hello')); // true;
382
+ * @example
383
+ * // Create independent copy
384
+ * const trie = new Trie(['hello', 'world']);
385
+ * const copy = trie.clone();
386
+ * copy.delete('hello');
387
+ * console.log(trie.has('hello')); // true;
796
388
  */
797
389
  clone(): this;
798
390
  /**
@@ -801,99 +393,21 @@ export declare class Trie<R = any> extends IterableElementBase<string, R> {
801
393
  * @param predicate - Predicate (word, index, trie) → boolean to keep word.
802
394
  * @param [thisArg] - Value for `this` inside the predicate.
803
395
  * @returns A new trie containing words that satisfy the predicate.
804
-
805
-
806
-
807
-
808
-
809
-
810
-
811
-
812
-
813
-
814
-
815
-
816
-
817
-
818
-
819
-
820
-
821
-
822
-
823
-
824
-
825
-
826
-
827
-
828
-
829
-
830
-
831
-
832
-
833
-
834
-
835
-
836
-
837
-
838
-
839
-
840
-
841
-
842
-
843
- * @example
844
- * // Filter words
845
- * const trie = new Trie(['cat', 'car', 'dog', 'card']);
846
- * const result = trie.filter(w => w.startsWith('ca'));
847
- * console.log(result.size); // 3;
396
+ * @example
397
+ * // Filter words
398
+ * const trie = new Trie(['cat', 'car', 'dog', 'card']);
399
+ * const result = trie.filter(w => w.startsWith('ca'));
400
+ * console.log(result.size); // 3;
848
401
  */
849
402
  filter(predicate: ElementCallback<string, R, boolean>, thisArg?: unknown): this;
850
403
  /**
851
- * Transform words
852
-
853
-
854
-
855
-
856
-
857
-
858
-
859
-
860
-
861
-
862
-
863
-
864
-
865
-
866
-
867
-
868
-
869
-
870
-
871
-
872
-
873
-
874
-
875
-
876
-
877
-
878
-
879
-
880
-
881
-
882
-
883
-
884
-
885
-
886
-
887
-
888
-
889
-
890
-
891
- * @example
892
- * // Transform words
893
- * const trie = new Trie(['hello', 'world']);
894
- * const upper = trie.map(w => w.toUpperCase());
895
- * console.log(upper.has('HELLO')); // true;
896
- */
404
+ * Transform words
405
+ * @example
406
+ * // Transform words
407
+ * const trie = new Trie(['hello', 'world']);
408
+ * const upper = trie.map(w => w.toUpperCase());
409
+ * console.log(upper.has('HELLO')); // true;
410
+ */
897
411
  map<RM>(callback: ElementCallback<string, R, string>, options?: TrieOptions<RM>, thisArg?: unknown): Trie<RM>;
898
412
  /**
899
413
  * Map words into a new trie (possibly different record type).