UNPKG

ut2

Version:

一个现代 JavaScript 实用工具库。[点击查看在线文档]。

15 lines (11 loc) 341 B
'use strict'; var getTag = require('./internals/getTag.js'); var native = require('./internals/native.js'); var fileExisted = typeof File !== native.stringUndefined; function isFile(value) { if (fileExisted && value instanceof File) { return true; } return getTag(value) === native.fileTag; } module.exports = isFile;