@empathyco/x-components
Version:
Empathy X Components
71 lines (33 loc) • 930 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [isInRange](./x-components.isinrange.md)
## isInRange() function
Returns true if the number is greater than or equal than the min, and less than or equal than the max.
**Signature:**
```typescript
export declare function isInRange(number: number, [min, max]: [number, number]): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
number
</td><td>
number
</td><td>
The number to check if it belongs to the range.
</td></tr>
<tr><td>
\[min, max\]
</td><td>
\[number, number\]
</td><td>
</td></tr>
</tbody></table>
**Returns:**
boolean
True when the number is in the range. False otherwise.