Skip to content
On this page

isNullOrUnDef

提供一个方便的方式来判断一个值是否为 null 或者 undefined 中的一个

引入方式

ESM

javascript
import { isNullOrUnDef } from "tool-assistant;

示例

javascript
// 引入 isNullOrUnDef 函数
import { isNullOrUnDef } from "tool-assistant";

// 定义一个变量
const value = undefined;

// 使用 isNullOrUnDef 函数判断值是否为 null 或 undefined
const result = isNullOrUnDef(value);

// 打印结果
console.log(result); // 输出 true

Released under the MIT License.