@empathyco/x-components
Version:
Empathy X Components
28 lines (16 loc) • 744 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
| Parameter | Type | Description |
| --- | --- | --- |
| number | number | The number to check if it belongs to the range. |
| \[min, max\] | \[number, number\] | |
**Returns:**
boolean
True when the number is in the range. False otherwise.