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