visual-design
Version:
A Component Library for Vue 3
22 lines (19 loc) • 788 B
JavaScript
import { isArray, isObject, isString } from '@vue/shared';
export { isArray, isDate, isFunction, isObject, isPromise, isString, isSymbol } from '@vue/shared';
const isUndefined = (val) => val === void 0;
const isBoolean = (val) => typeof val === "boolean";
const isNumber = (val) => typeof val === "number";
const isEmpty = (val) => !val && val !== 0 || isArray(val) && val.length === 0 || isObject(val) && !Object.keys(val).length;
const isElement = (e) => {
if (typeof Element === "undefined")
return false;
return e instanceof Element;
};
const isStringNumber = (val) => {
if (!isString(val)) {
return false;
}
return !Number.isNaN(Number(val));
};
export { isBoolean, isElement, isEmpty, isNumber, isStringNumber, isUndefined };
//# sourceMappingURL=types.mjs.map