GuobaGuoba Utils

isNilOrEmpty

@guoba-ai/utils / guard / isNilOrEmpty

Function: isNilOrEmpty()

function isNilOrEmpty(val): boolean;

Defined in: guard.ts:234

Check if a value is null, undefined, or empty. This uses the same empty-value rules as isEmpty.

Parameters

val

unknown

The value to check

Returns

boolean

true if the value is null, undefined, or empty

Example

isNilOrEmpty(null) // true
isNilOrEmpty('') // true
isNilOrEmpty('hello') // false

On this page