function is(argv, ...args) {
    let type = toString.call(argv);

    // 查找匹配项
    for (let name of args) {
        if (type === name || type === map[name]) {
            return args.length > 1 ? name : true;
        }
    }

    // 输出错误信息
    if (process.env.NODE_ENV === 'development') {
        console.error(`Invalid type: expected a ${ args.join('/') } but got: ${ type } !`);
    }

    // 匹配失败
    return false;
}
function is(argv, ...args) {
    let type = toString.call(argv);

    
    for (let name of args) {
        if (type === name || type === map[name]) {
            return args.length > 1 ? name : true;
        }
    }

    
    if (process.env.NODE_ENV === 'development') {
        console.error(`Invalid type: expected a ${ args.join('/') } but got: ${ type } !`);
    }

    
    return false;
}
function is ( argv , ... args ) { let type = toString . call ( argv ) ; // 查找匹配项 for ( let name of args ) { if ( type === name || type === map [ name ] ) { return args . length > 1 ? name : true ; } } // 输出错误信息 if ( process . env . NODE_ENV === 'development' ) { console . error ( ` ${ args . join ( '/' ) } ${ type } ` ) ; } // 匹配失败 return false ; }
****************************************
判定类型
****************************************
**************************************** 判定类型 ****************************************