Is Empty Array
Checks if an array is empty.
Category | Validations |
Author | Polgubau |
Since | 1.0.0 |
Last Updated | 2025-03-17 |
Type | Sync |
Compatibility | Universal |
Example
Input
isEmptyArray([])
Output:
true
Input
isEmptyArray([1, 2, 3])
Output:
false
Return
Returns `true` if the array is empty, otherwise `false`.
Type: boolean
Props
Name | Type | Default | Required | Description |
---|---|---|---|---|
arr | any[] | null | No | The array to check. |
Notes
The function checks if the value is actually an array and if it is empty.
Tags
- validation
- array
- empty