// 判断是不是 File 文件 function isFile(file) { return file instanceof File; } // 判断是不是字符串 function isString(str) { return typeof str === 'string'; }