Toolbox-XToolbox-X
GuardsArray Guards

Check Empty/Invalid Array

Checks if a value is an empty array or an array with only empty values.

isInvalidOrEmptyArray

Checks if a value is an empty array or an array with only empty values.

Import

import { isInvalidOrEmptyArray } from 'toolbox-x/guards';
// or
import { isInvalidOrEmptyArray } from 'toolbox-x';

Signature

isInvalidOrEmptyArray<T>(value: T): boolean;

Parameters

  • value (T): The value to check.

Return Value

  • boolean: true if the value is not an array, an empty array, or an array containing only null, undefined, empty objects, or empty arrays.

Example

playground.ts

Last updated: Mon, Jun 08, 2026 08:48:01AM (UTC)

On this page