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

Parameter

Type

Description

value

number

The numeric value.

range

Range

The numeric range.

precision

number

(Optional) Optional precision in number of digits.

Returns:

boolean

True if the value is within the range.