@empathyco/x-components
Version:
Empathy X Components
27 lines (15 loc) • 794 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [isArrayEmpty](./x-components.isarrayempty.md)
## isArrayEmpty() function
Returns if the given array is `null`<!-- -->, `undefined`<!-- -->, or has no elements.
**Signature:**
```typescript
export declare function isArrayEmpty(array: unknown[] | undefined | null): array is undefined | null | [];
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| array | unknown\[\] \| undefined \| null | The array to check if it is empty. |
**Returns:**
array is undefined \| null \| \[\]
`true` if the array is `null`<!-- -->, `undefined`<!-- -->, or has no elements. `false` otherwise.