Skip to content

@longmo-utils/common / isNil

Function: isNil()

ts
function isNil(value): boolean;

检测value是否是nullundefined

Parameters

ParameterTypeDescription
valueany待检测值

Returns

boolean

boolean

Example

ts
isNil(null); // => true
isNil(void 0); // => true
isNil(NaN); // => false

Released under the MIT License.