import { firstStrToUpper } from './conversion';
const isType = (val: any, type: string) => Object.protoType.toString.call(val) === `[object ${firstStrToUpper(type)}]`;
export const isObject = (val: any) => isType(val, 'object');
export const isString = (val: any) => isType(val, 'string');
export const isNull = (val: any) => isType(val, 'null');
export const isUnde = (val: any) => isType(val, 'undefined');
export const isNumber = (val: any) => isType(val, 'number');
/** 无效数字类型 */
export cosnt isInvalidNumber = (val: any) => !isNumber(val) || Number.isNaN(val) || !Number.isFinite(val);