first commit

This commit is contained in:
lingxiao865
2026-02-10 08:05:03 +08:00
commit c5af079d8c
1094 changed files with 97530 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
export function isFunction(val) {
return typeof val === 'function';
}
export const isString = val => typeof val === 'string';
export const isNull = value => value === null;
export const isUndefined = value => value === undefined;
export function isDef(value) {
return !isUndefined(value) && !isNull(value);
}
export function isInteger(value) {
return Number.isInteger(value);
}
export function isNumeric(value) {
return !Number.isNaN(Number(value));
}
export function isNumber(value) {
return typeof value === 'number';
}
export function isBoolean(value) {
return typeof value === 'boolean';
}
export function isObject(x) {
const type = typeof x;
return x !== null && (type === 'object' || type === 'function');
}
export function isPlainObject(val) {
return val !== null && typeof val === 'object' && Object.prototype.toString.call(val) === '[object Object]';
}