Skip to main content

core.matchesrange

Home > @medplum/core > matchesRange

matchesRange() function

Returns true if the value is in the range accounting for precision.

Signature:

export declare function matchesRange(value: number, range: Range, precision?: number): boolean;

Parameters

ParameterTypeDescription
valuenumberThe numeric value.
rangeRangeThe numeric range.
precisionnumber(Optional) Optional precision in number of digits.

Returns:

boolean

True if the value is within the range.