Skip to content

引入 ​

js
import { isEmpty } from "grantlibs";
或;
const { isEmpty } = require("grantlibs");
isEmpty (string , null , object , undefined)

使用 ​

ts

isEmpty(value): boolean

参数 ​

  • value: string | null | object | undefined

返回 ​

boolean: true or false

示例 ​

js
const bool1 = isEmpty({});
// => true
const bool2 = isEmpty({ a: 2, c: 3 });
// => false