@nutui/nutui-react
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
8 lines (7 loc) • 343 B
JavaScript
import { _ as _type_of } from "@swc/helpers/_/_type_of";
export var isEmpty = function(p) {
if (p === null || p === undefined) return true;
if ((typeof p === "undefined" ? "undefined" : _type_of(p)) === 'object' && Object.keys(p).length === 0) return true;
if (Array.isArray(p) && p.length === 0) return true;
return false;
};