@empathyco/x-components
Version:
Empathy X Components
57 lines (27 loc) • 929 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
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
array
</td><td>
unknown\[\] \| undefined \| null
</td><td>
The array to check if it is empty.
</td></tr>
</tbody></table>
**Returns:**
array is undefined \| null \| \[\]
`true` if the array is `null`<!-- -->, `undefined`<!-- -->, or has no elements. `false` otherwise.