isArrayEmpty

Checks if an array is empty.

Of course, you can always check an empty array by doing Arr.length but if you'd like a reusable solution, then here you go.

import { isArrayEmpty } from '1loc'

isArrayEmpty([]) // true
isArrayEmpty([2]) // false

Last updated