collectype

collectype v0.11.0


collectype / utils/primitives/undefined / hasUndefined

Function: hasUndefined()

hasUndefined<T>(…args): boolean

Defined in: utils/primitives/undefined.ts:13

Returns true if any of the provided arguments is undefined. Useful for quickly checking the presence of undefined values in a list.

Type Parameters

T

T = unknown

The argument type (inferred)

Parameters

args

T[]

List of values to check

Returns

boolean

True if at least one argument is undefined, false otherwise

Example

hasUndefined(1, undefined, 3); // true
hasUndefined('a', 'b', 'c'); // false