@longmo-utils/common / isNil
Function: isNil()
ts
function isNil(value): boolean;检测value是否是null或undefined
Parameters
| Parameter | Type | Description |
|---|---|---|
value | any | 待检测值 |
Returns
boolean
boolean
Example
ts
isNil(null); // => true
isNil(void 0); // => true
isNil(NaN); // => false