You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
997 B
30 lines
997 B
import { isArray, isObject, isString } from '@vue/shared';
|
|
export { isArray, isDate, isFunction, isObject, isPromise, isString, isSymbol } from '@vue/shared';
|
|
import { isNil } from 'lodash-unified';
|
|
export { isVNode } from 'vue';
|
|
|
|
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 isPropAbsent = (prop) => {
|
|
return isNil(prop);
|
|
};
|
|
const isStringNumber = (val) => {
|
|
if (!isString(val)) {
|
|
return false;
|
|
}
|
|
return !Number.isNaN(Number(val));
|
|
};
|
|
const isWindow = (val) => {
|
|
return val === window;
|
|
};
|
|
|
|
export { isBoolean, isElement, isEmpty, isNumber, isPropAbsent, isStringNumber, isUndefined, isWindow };
|
|
//# sourceMappingURL=types.mjs.map
|