UNPKG

@empathyco/x-components

Version:
57 lines (27 loc) 929 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [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.