Add exponential backoff utility

This commit is contained in:
2026-08-20 10:31:44 +00:00
committed by Kuldeep
parent 0cd615249e
commit 4e555c6ffe
12 changed files with 1664 additions and 7 deletions
+17
View File
@@ -20,3 +20,20 @@ export const deepFreeze = <T>(value: T): DeeplyReadonly<T> => {
return value;
};
/**
* Validate the value is within the bounds, returning true if it is within the bounds, false otherwise
*
* @param value - The value to validate
* @param min - The minimum value
* @param max - The maximum value
*
* @returns True if the value is within the bounds, false otherwise
*/
export const isWithinBounds = (value: number, min: number, max: number): boolean => {
if (value < min || value > max) {
return false;
}
return true;
};