Is Empty Array

Checks if an array is empty.

CategoryValidations
AuthorPolgubau
Since1.0.0
Last Updated2025-03-17
TypeSync
CompatibilityUniversal

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

NameTypeDefaultRequiredDescription
arrany[]nullNoThe array to check.

Notes

The function checks if the value is actually an array and if it is empty.

Tags

  • validation
  • array
  • empty

Related