Skip to content

isNullish ​

判断输入值是否为 null 或 undefined。

使用 ​

ts
import { isNullish } from 'rattail'

isNullish(null) // return true
isNullish(undefined) // return true
isNullish(123) // return false

参数 ​

参数类型默认值
valueany

返回值 ​

类型
boolean