GuobaGuoba Utils

isNullOrUndef

@guoba-ai/utils / guard / isNullOrUndef

Function: isNullOrUndef()

function isNullOrUndef(val): val is null | undefined;

Defined in: guard.ts:136

Check if a value is null or undefined.

Parameters

val

unknown

The value to check

Returns

val is null | undefined

true if the value is null or undefined

Example

isNullOrUndef(null) // true
isNullOrUndef(undefined) // true
isNullOrUndef(0) // false

On this page