UNPKG

@perceptr/web-sdk

Version:

Perceptr Web SDK for recording and monitoring user sessions

10 lines (9 loc) 443 B
/** * Clamps a value to a range. * @param value the value to clamp * @param min the minimum value * @param max the maximum value * @param label if provided then enables logging and prefixes all logs with labels * @param fallbackValue if provided then returns this value if the value is not a valid number */ export declare function clampToRange(value: unknown, min: number, max: number, label?: string, fallbackValue?: number): number;