isFile.js 301 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 import { isFunction } from "./isFunction.js"; export const isFile = (value) => Boolean(value && typeof value === "object" && isFunction(value.constructor) && value[Symbol.toStringTag] === "File" && isFunction(value.stream) && value.name != null); export const isFileLike = isFile;