UNPKG

@arco-vue-pro-components/pro-components

Version:
24 lines (23 loc) 643 B
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 };