deque-typed 2.5.0 → 2.5.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 (90) hide show
  1. package/dist/cjs/index.cjs +418 -51
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs-legacy/index.cjs +417 -50
  4. package/dist/cjs-legacy/index.cjs.map +1 -1
  5. package/dist/esm/index.mjs +418 -52
  6. package/dist/esm/index.mjs.map +1 -1
  7. package/dist/esm-legacy/index.mjs +417 -51
  8. package/dist/esm-legacy/index.mjs.map +1 -1
  9. package/dist/types/common/error.d.ts +9 -0
  10. package/dist/types/common/index.d.ts +1 -1
  11. package/dist/types/data-structures/base/index.d.ts +1 -0
  12. package/dist/types/data-structures/base/iterable-entry-base.d.ts +8 -8
  13. package/dist/types/data-structures/base/linear-base.d.ts +3 -3
  14. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +288 -0
  15. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +336 -0
  16. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +618 -18
  17. package/dist/types/data-structures/binary-tree/bst.d.ts +676 -1
  18. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +456 -0
  19. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +144 -1
  20. package/dist/types/data-structures/binary-tree/tree-map.d.ts +3307 -399
  21. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +3285 -360
  22. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +2674 -325
  23. package/dist/types/data-structures/binary-tree/tree-set.d.ts +3072 -287
  24. package/dist/types/data-structures/graph/abstract-graph.d.ts +4 -4
  25. package/dist/types/data-structures/graph/directed-graph.d.ts +240 -0
  26. package/dist/types/data-structures/graph/undirected-graph.d.ts +216 -0
  27. package/dist/types/data-structures/hash/hash-map.d.ts +274 -10
  28. package/dist/types/data-structures/heap/heap.d.ts +336 -0
  29. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +411 -3
  30. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +363 -3
  31. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +434 -2
  32. package/dist/types/data-structures/matrix/matrix.d.ts +192 -0
  33. package/dist/types/data-structures/queue/deque.d.ts +364 -4
  34. package/dist/types/data-structures/queue/queue.d.ts +288 -0
  35. package/dist/types/data-structures/stack/stack.d.ts +240 -0
  36. package/dist/types/data-structures/trie/trie.d.ts +292 -4
  37. package/dist/types/interfaces/graph.d.ts +1 -1
  38. package/dist/types/types/common.d.ts +2 -2
  39. package/dist/types/types/data-structures/binary-tree/bst.d.ts +1 -0
  40. package/dist/types/types/data-structures/binary-tree/tree-map.d.ts +5 -0
  41. package/dist/types/types/data-structures/binary-tree/tree-multi-set.d.ts +4 -0
  42. package/dist/types/types/data-structures/binary-tree/tree-set.d.ts +4 -0
  43. package/dist/types/types/data-structures/heap/heap.d.ts +1 -0
  44. package/dist/types/types/data-structures/priority-queue/priority-queue.d.ts +1 -0
  45. package/dist/types/types/utils/validate-type.d.ts +4 -4
  46. package/dist/umd/deque-typed.js +415 -49
  47. package/dist/umd/deque-typed.js.map +1 -1
  48. package/dist/umd/deque-typed.min.js +1 -1
  49. package/dist/umd/deque-typed.min.js.map +1 -1
  50. package/package.json +2 -2
  51. package/src/common/error.ts +19 -1
  52. package/src/common/index.ts +1 -1
  53. package/src/data-structures/base/index.ts +1 -0
  54. package/src/data-structures/base/iterable-element-base.ts +3 -2
  55. package/src/data-structures/base/iterable-entry-base.ts +8 -8
  56. package/src/data-structures/base/linear-base.ts +3 -3
  57. package/src/data-structures/binary-tree/avl-tree.ts +299 -0
  58. package/src/data-structures/binary-tree/binary-indexed-tree.ts +341 -5
  59. package/src/data-structures/binary-tree/binary-tree.ts +606 -6
  60. package/src/data-structures/binary-tree/bst.ts +946 -7
  61. package/src/data-structures/binary-tree/red-black-tree.ts +472 -0
  62. package/src/data-structures/binary-tree/segment-tree.ts +145 -2
  63. package/src/data-structures/binary-tree/tree-map.ts +3423 -499
  64. package/src/data-structures/binary-tree/tree-multi-map.ts +3537 -596
  65. package/src/data-structures/binary-tree/tree-multi-set.ts +2855 -495
  66. package/src/data-structures/binary-tree/tree-set.ts +3209 -413
  67. package/src/data-structures/graph/abstract-graph.ts +6 -6
  68. package/src/data-structures/graph/directed-graph.ts +240 -0
  69. package/src/data-structures/graph/undirected-graph.ts +216 -0
  70. package/src/data-structures/hash/hash-map.ts +281 -19
  71. package/src/data-structures/heap/heap.ts +340 -4
  72. package/src/data-structures/heap/max-heap.ts +2 -2
  73. package/src/data-structures/linked-list/doubly-linked-list.ts +411 -3
  74. package/src/data-structures/linked-list/singly-linked-list.ts +363 -3
  75. package/src/data-structures/linked-list/skip-linked-list.ts +439 -7
  76. package/src/data-structures/matrix/matrix.ts +202 -10
  77. package/src/data-structures/priority-queue/max-priority-queue.ts +2 -2
  78. package/src/data-structures/queue/deque.ts +365 -5
  79. package/src/data-structures/queue/queue.ts +288 -0
  80. package/src/data-structures/stack/stack.ts +240 -0
  81. package/src/data-structures/trie/trie.ts +295 -7
  82. package/src/interfaces/graph.ts +1 -1
  83. package/src/types/common.ts +2 -2
  84. package/src/types/data-structures/binary-tree/bst.ts +1 -0
  85. package/src/types/data-structures/binary-tree/tree-map.ts +6 -0
  86. package/src/types/data-structures/binary-tree/tree-multi-set.ts +5 -0
  87. package/src/types/data-structures/binary-tree/tree-set.ts +5 -0
  88. package/src/types/data-structures/heap/heap.ts +1 -0
  89. package/src/types/data-structures/priority-queue/priority-queue.ts +1 -0
  90. package/src/types/utils/validate-type.ts +4 -4
@@ -9,6 +9,61 @@ var rangeCheck = /* @__PURE__ */ __name((index, min, max, message) => {
9
9
  }, "rangeCheck");
10
10
  var calcMinUnitsRequired = /* @__PURE__ */ __name((totalQuantity, unitSize) => Math.floor((totalQuantity + unitSize - 1) / unitSize), "calcMinUnitsRequired");
11
11
 
12
+ // src/common/error.ts
13
+ function raise(ErrorClass, message) {
14
+ throw new ErrorClass(message);
15
+ }
16
+ __name(raise, "raise");
17
+ var ERR = {
18
+ // Range / index
19
+ indexOutOfRange: /* @__PURE__ */ __name((index, min, max, ctx) => `${ctx ? ctx + ": " : ""}Index ${index} is out of range [${min}, ${max}].`, "indexOutOfRange"),
20
+ invalidIndex: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}Index must be an integer.`, "invalidIndex"),
21
+ // Type / argument
22
+ invalidArgument: /* @__PURE__ */ __name((reason, ctx) => `${ctx ? ctx + ": " : ""}${reason}`, "invalidArgument"),
23
+ comparatorRequired: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}Comparator is required for non-number/non-string/non-Date keys.`, "comparatorRequired"),
24
+ invalidKey: /* @__PURE__ */ __name((reason, ctx) => `${ctx ? ctx + ": " : ""}${reason}`, "invalidKey"),
25
+ notAFunction: /* @__PURE__ */ __name((name, ctx) => `${ctx ? ctx + ": " : ""}${name} must be a function.`, "notAFunction"),
26
+ invalidEntry: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}Each entry must be a [key, value] tuple.`, "invalidEntry"),
27
+ invalidNaN: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}NaN is not a valid key.`, "invalidNaN"),
28
+ invalidDate: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}Invalid Date key.`, "invalidDate"),
29
+ reduceEmpty: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}Reduce of empty structure with no initial value.`, "reduceEmpty"),
30
+ callbackReturnType: /* @__PURE__ */ __name((expected, got, ctx) => `${ctx ? ctx + ": " : ""}Callback must return ${expected}; got ${got}.`, "callbackReturnType"),
31
+ // State / operation
32
+ invalidOperation: /* @__PURE__ */ __name((reason, ctx) => `${ctx ? ctx + ": " : ""}${reason}`, "invalidOperation"),
33
+ // Matrix
34
+ matrixDimensionMismatch: /* @__PURE__ */ __name((op) => `Matrix: Dimensions must be compatible for ${op}.`, "matrixDimensionMismatch"),
35
+ matrixSingular: /* @__PURE__ */ __name(() => "Matrix: Singular matrix, inverse does not exist.", "matrixSingular"),
36
+ matrixNotSquare: /* @__PURE__ */ __name(() => "Matrix: Must be square for inversion.", "matrixNotSquare"),
37
+ matrixNotRectangular: /* @__PURE__ */ __name(() => "Matrix: Must be rectangular for transposition.", "matrixNotRectangular"),
38
+ matrixRowMismatch: /* @__PURE__ */ __name((expected, got) => `Matrix: Expected row length ${expected}, but got ${got}.`, "matrixRowMismatch"),
39
+ // Order statistic
40
+ orderStatisticNotEnabled: /* @__PURE__ */ __name((method, ctx) => `${ctx ? ctx + ": " : ""}${method}() requires enableOrderStatistic: true.`, "orderStatisticNotEnabled")
41
+ };
42
+
43
+ // src/common/index.ts
44
+ var DFSOperation = /* @__PURE__ */ ((DFSOperation2) => {
45
+ DFSOperation2[DFSOperation2["VISIT"] = 0] = "VISIT";
46
+ DFSOperation2[DFSOperation2["PROCESS"] = 1] = "PROCESS";
47
+ return DFSOperation2;
48
+ })(DFSOperation || {});
49
+ var Range = class {
50
+ constructor(low, high, includeLow = true, includeHigh = true) {
51
+ this.low = low;
52
+ this.high = high;
53
+ this.includeLow = includeLow;
54
+ this.includeHigh = includeHigh;
55
+ }
56
+ static {
57
+ __name(this, "Range");
58
+ }
59
+ // Determine whether a key is within the range
60
+ isInRange(key, comparator) {
61
+ const lowCheck = this.includeLow ? comparator(key, this.low) >= 0 : comparator(key, this.low) > 0;
62
+ const highCheck = this.includeHigh ? comparator(key, this.high) <= 0 : comparator(key, this.high) < 0;
63
+ return lowCheck && highCheck;
64
+ }
65
+ };
66
+
12
67
  // src/data-structures/base/iterable-element-base.ts
13
68
  var IterableElementBase = class {
14
69
  static {
@@ -27,7 +82,7 @@ var IterableElementBase = class {
27
82
  if (options) {
28
83
  const { toElementFn } = options;
29
84
  if (typeof toElementFn === "function") this._toElementFn = toElementFn;
30
- else if (toElementFn) throw new TypeError("toElementFn must be a function type");
85
+ else if (toElementFn) raise(TypeError, "toElementFn must be a function type");
31
86
  }
32
87
  }
33
88
  /**
@@ -190,7 +245,7 @@ var IterableElementBase = class {
190
245
  acc = initialValue;
191
246
  } else {
192
247
  const first = iter.next();
193
- if (first.done) throw new TypeError("Reduce of empty structure with no initial value");
248
+ if (first.done) raise(TypeError, "Reduce of empty structure with no initial value");
194
249
  acc = first.value;
195
250
  index = 1;
196
251
  }
@@ -564,6 +619,30 @@ var Deque = class extends LinearBase {
564
619
 
565
620
 
566
621
 
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+
567
646
  * @example
568
647
  * // Deque peek at both ends
569
648
  * const deque = new Deque<number>([10, 20, 30, 40, 50]);
@@ -598,6 +677,30 @@ var Deque = class extends LinearBase {
598
677
 
599
678
 
600
679
 
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
601
704
  * @example
602
705
  * // Peek at the back element
603
706
  * const dq = new Deque<string>(['a', 'b', 'c']);
@@ -637,6 +740,30 @@ var Deque = class extends LinearBase {
637
740
 
638
741
 
639
742
 
743
+
744
+
745
+
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+
754
+
755
+
756
+
757
+
758
+
759
+
760
+
761
+
762
+
763
+
764
+
765
+
766
+
640
767
  * @example
641
768
  * // basic Deque creation and push/pop operations
642
769
  * // Create a simple Deque with initial values
@@ -689,6 +816,30 @@ var Deque = class extends LinearBase {
689
816
 
690
817
 
691
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
+
692
843
  * @example
693
844
  * // Remove from the back
694
845
  * const dq = new Deque<number>([1, 2, 3]);
@@ -728,6 +879,30 @@ var Deque = class extends LinearBase {
728
879
 
729
880
 
730
881
 
882
+
883
+
884
+
885
+
886
+
887
+
888
+
889
+
890
+
891
+
892
+
893
+
894
+
895
+
896
+
897
+
898
+
899
+
900
+
901
+
902
+
903
+
904
+
905
+
731
906
  * @example
732
907
  * // Remove from the front
733
908
  * const dq = new Deque<number>([1, 2, 3]);
@@ -768,6 +943,30 @@ var Deque = class extends LinearBase {
768
943
 
769
944
 
770
945
 
946
+
947
+
948
+
949
+
950
+
951
+
952
+
953
+
954
+
955
+
956
+
957
+
958
+
959
+
960
+
961
+
962
+
963
+
964
+
965
+
966
+
967
+
968
+
969
+
771
970
  * @example
772
971
  * // Deque shift and unshift operations
773
972
  * const deque = new Deque<number>([20, 30, 40]);
@@ -849,6 +1048,30 @@ var Deque = class extends LinearBase {
849
1048
 
850
1049
 
851
1050
 
1051
+
1052
+
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+
1065
+
1066
+
1067
+
1068
+
1069
+
1070
+
1071
+
1072
+
1073
+
1074
+
852
1075
  * @example
853
1076
  * // Check if empty
854
1077
  * const dq = new Deque();
@@ -870,6 +1093,30 @@ var Deque = class extends LinearBase {
870
1093
 
871
1094
 
872
1095
 
1096
+
1097
+
1098
+
1099
+
1100
+
1101
+
1102
+
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+
1109
+
1110
+
1111
+
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+
1118
+
1119
+
873
1120
  * @example
874
1121
  * // Remove all elements
875
1122
  * const dq = new Deque<number>([1, 2, 3]);
@@ -895,6 +1142,30 @@ var Deque = class extends LinearBase {
895
1142
 
896
1143
 
897
1144
 
1145
+
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+
1164
+
1165
+
1166
+
1167
+
1168
+
898
1169
  * @example
899
1170
  * // Access by index
900
1171
  * const dq = new Deque<string>(['a', 'b', 'c']);
@@ -1071,6 +1342,30 @@ var Deque = class extends LinearBase {
1071
1342
 
1072
1343
 
1073
1344
 
1345
+
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+
1356
+
1357
+
1358
+
1359
+
1360
+
1361
+
1362
+
1363
+
1364
+
1365
+
1366
+
1367
+
1368
+
1074
1369
  * @example
1075
1370
  * // Remove element
1076
1371
  * const dq = new Deque<number>([1, 2, 3]);
@@ -1134,6 +1429,30 @@ var Deque = class extends LinearBase {
1134
1429
 
1135
1430
 
1136
1431
 
1432
+
1433
+
1434
+
1435
+
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+
1137
1456
  * @example
1138
1457
  * // Deque for...of iteration and reverse
1139
1458
  * const deque = new Deque<string>(['A', 'B', 'C', 'D']);
@@ -1222,6 +1541,30 @@ var Deque = class extends LinearBase {
1222
1541
 
1223
1542
 
1224
1543
 
1544
+
1545
+
1546
+
1547
+
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+
1557
+
1558
+
1559
+
1560
+
1561
+
1562
+
1563
+
1564
+
1565
+
1566
+
1567
+
1225
1568
  * @example
1226
1569
  * // Reclaim memory
1227
1570
  * const dq = new Deque<number>([1, 2, 3, 4, 5]);
@@ -1269,6 +1612,30 @@ var Deque = class extends LinearBase {
1269
1612
 
1270
1613
 
1271
1614
 
1615
+
1616
+
1617
+
1618
+
1619
+
1620
+
1621
+
1622
+
1623
+
1624
+
1625
+
1626
+
1627
+
1628
+
1629
+
1630
+
1631
+
1632
+
1633
+
1634
+
1635
+
1636
+
1637
+
1638
+
1272
1639
  * @example
1273
1640
  * // Create independent copy
1274
1641
  * const dq = new Deque<number>([1, 2, 3]);
@@ -1299,6 +1666,30 @@ var Deque = class extends LinearBase {
1299
1666
 
1300
1667
 
1301
1668
 
1669
+
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+
1676
+
1677
+
1678
+
1679
+
1680
+
1681
+
1682
+
1683
+
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+
1690
+
1691
+
1692
+
1302
1693
  * @example
1303
1694
  * // Filter elements
1304
1695
  * const dq = new Deque<number>([1, 2, 3, 4]);
@@ -1349,6 +1740,30 @@ var Deque = class extends LinearBase {
1349
1740
 
1350
1741
 
1351
1742
 
1743
+
1744
+
1745
+
1746
+
1747
+
1748
+
1749
+
1750
+
1751
+
1752
+
1753
+
1754
+
1755
+
1756
+
1757
+
1758
+
1759
+
1760
+
1761
+
1762
+
1763
+
1764
+
1765
+
1766
+
1352
1767
  * @example
1353
1768
  * // Transform elements
1354
1769
  * const dq = new Deque<number>([1, 2, 3]);
@@ -1477,55 +1892,6 @@ var Deque = class extends LinearBase {
1477
1892
  }
1478
1893
  }
1479
1894
  };
1480
-
1481
- // src/common/error.ts
1482
- var ERR = {
1483
- // Range / index
1484
- indexOutOfRange: /* @__PURE__ */ __name((index, min, max, ctx) => `${ctx ? ctx + ": " : ""}Index ${index} is out of range [${min}, ${max}].`, "indexOutOfRange"),
1485
- invalidIndex: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}Index must be an integer.`, "invalidIndex"),
1486
- // Type / argument
1487
- invalidArgument: /* @__PURE__ */ __name((reason, ctx) => `${ctx ? ctx + ": " : ""}${reason}`, "invalidArgument"),
1488
- comparatorRequired: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}Comparator is required for non-number/non-string/non-Date keys.`, "comparatorRequired"),
1489
- invalidKey: /* @__PURE__ */ __name((reason, ctx) => `${ctx ? ctx + ": " : ""}${reason}`, "invalidKey"),
1490
- notAFunction: /* @__PURE__ */ __name((name, ctx) => `${ctx ? ctx + ": " : ""}${name} must be a function.`, "notAFunction"),
1491
- invalidEntry: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}Each entry must be a [key, value] tuple.`, "invalidEntry"),
1492
- invalidNaN: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}NaN is not a valid key.`, "invalidNaN"),
1493
- invalidDate: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}Invalid Date key.`, "invalidDate"),
1494
- reduceEmpty: /* @__PURE__ */ __name((ctx) => `${ctx ? ctx + ": " : ""}Reduce of empty structure with no initial value.`, "reduceEmpty"),
1495
- callbackReturnType: /* @__PURE__ */ __name((expected, got, ctx) => `${ctx ? ctx + ": " : ""}Callback must return ${expected}; got ${got}.`, "callbackReturnType"),
1496
- // State / operation
1497
- invalidOperation: /* @__PURE__ */ __name((reason, ctx) => `${ctx ? ctx + ": " : ""}${reason}`, "invalidOperation"),
1498
- // Matrix
1499
- matrixDimensionMismatch: /* @__PURE__ */ __name((op) => `Matrix: Dimensions must be compatible for ${op}.`, "matrixDimensionMismatch"),
1500
- matrixSingular: /* @__PURE__ */ __name(() => "Matrix: Singular matrix, inverse does not exist.", "matrixSingular"),
1501
- matrixNotSquare: /* @__PURE__ */ __name(() => "Matrix: Must be square for inversion.", "matrixNotSquare"),
1502
- matrixNotRectangular: /* @__PURE__ */ __name(() => "Matrix: Must be rectangular for transposition.", "matrixNotRectangular"),
1503
- matrixRowMismatch: /* @__PURE__ */ __name((expected, got) => `Matrix: Expected row length ${expected}, but got ${got}.`, "matrixRowMismatch")
1504
- };
1505
-
1506
- // src/common/index.ts
1507
- var DFSOperation = /* @__PURE__ */ ((DFSOperation2) => {
1508
- DFSOperation2[DFSOperation2["VISIT"] = 0] = "VISIT";
1509
- DFSOperation2[DFSOperation2["PROCESS"] = 1] = "PROCESS";
1510
- return DFSOperation2;
1511
- })(DFSOperation || {});
1512
- var Range = class {
1513
- constructor(low, high, includeLow = true, includeHigh = true) {
1514
- this.low = low;
1515
- this.high = high;
1516
- this.includeLow = includeLow;
1517
- this.includeHigh = includeHigh;
1518
- }
1519
- static {
1520
- __name(this, "Range");
1521
- }
1522
- // Determine whether a key is within the range
1523
- isInRange(key, comparator) {
1524
- const lowCheck = this.includeLow ? comparator(key, this.low) >= 0 : comparator(key, this.low) > 0;
1525
- const highCheck = this.includeHigh ? comparator(key, this.high) <= 0 : comparator(key, this.high) < 0;
1526
- return lowCheck && highCheck;
1527
- }
1528
- };
1529
1895
  /**
1530
1896
  * data-structure-typed
1531
1897
  *
@@ -1534,6 +1900,6 @@ var Range = class {
1534
1900
  * @license MIT License
1535
1901
  */
1536
1902
 
1537
- export { DFSOperation, Deque, ERR, Range };
1903
+ export { DFSOperation, Deque, ERR, Range, raise };
1538
1904
  //# sourceMappingURL=index.mjs.map
1539
1905
  //# sourceMappingURL=index.mjs.map