@arco-vue-pro-components/pro-components
Version:
基于@arco-design/web-vue组件的高级组件,包括pro-table
24 lines (23 loc) • 643 B
JavaScript
const opt = Object.prototype.toString;
function isArray(obj) {
return opt.call(obj) === "[object Array]";
}
function isNull(obj) {
return opt.call(obj) === "[object Null]";
}
function isObject(obj) {
return opt.call(obj) === "[object Object]";
}
function isString(obj) {
return opt.call(obj) === "[object String]";
}
function isNumber(obj) {
return opt.call(obj) === "[object Number]" && obj === obj;
}
function isUndefined(obj) {
return obj === void 0;
}
function isEmptyObject(obj) {
return isObject(obj) && Object.keys(obj).length === 0;
}
export { isArray, isEmptyObject, isNull, isNumber, isObject, isString, isUndefined };