Checks if the given value is Nil / Noting.
The undefined
& null
values are considered Nullish (opens in a new tab).
Syntax
import { isNil } from '@opentf/std';
isNil(val: unknown): Boolean;
Examples
isNil('') //=> false
isNil([]) //=> false
isNil({}) //=> false
isNil() //=> true
isNil(undefined) //=> true
isNil(null) //=> true