@ptolemy2002/rgx 4.2.0 → 4.2.1
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.
|
@@ -17,4 +17,4 @@ export declare class RGXOutOfBoundsError extends RGXError {
|
|
|
17
17
|
toString(): string;
|
|
18
18
|
}
|
|
19
19
|
export declare function isInRange(value: number, { min, max, inclusiveLeft, inclusiveRight }?: RangeObject): boolean;
|
|
20
|
-
export declare function assertInRange(value: number, range
|
|
20
|
+
export declare function assertInRange(value: number, range?: RangeObject, message?: string): void;
|
|
@@ -102,7 +102,7 @@ function isInRange(value, { min = null, max = null, inclusiveLeft = true, inclus
|
|
|
102
102
|
}
|
|
103
103
|
return true;
|
|
104
104
|
}
|
|
105
|
-
function assertInRange(value, range, message = "Value out of bounds") {
|
|
105
|
+
function assertInRange(value, range = {}, message = "Value out of bounds") {
|
|
106
106
|
if (!isInRange(value, range)) {
|
|
107
107
|
throw new RGXOutOfBoundsError(message, value, range);
|
|
108
108
|
}
|