binary-tree-typed 2.2.5 → 2.2.7

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.
@@ -998,6 +998,14 @@ var _IterableEntryBase = class _IterableEntryBase {
998
998
  }
999
999
  return accumulator;
1000
1000
  }
1001
+ /**
1002
+ * Converts data structure to `[key, value]` pairs.
1003
+ * @returns Array of entries.
1004
+ * @remarks Time O(n), Space O(n)
1005
+ */
1006
+ toArray() {
1007
+ return [...this];
1008
+ }
1001
1009
  /**
1002
1010
  * Visualize the iterable as an array of `[key, value]` pairs (or a custom string).
1003
1011
  * @returns Array of entries (default) or a string.
@@ -1029,8 +1037,6 @@ var _Range = class _Range {
1029
1037
  this.high = high;
1030
1038
  this.includeLow = includeLow;
1031
1039
  this.includeHigh = includeHigh;
1032
- if (!(isComparable(low) && isComparable(high))) throw new RangeError("low or high is not comparable");
1033
- if (low > high) throw new RangeError("low must be less than or equal to high");
1034
1040
  }
1035
1041
  // Determine whether a key is within the range
1036
1042
  isInRange(key, comparator) {