AI_botter/node_modules/form-data-encoder/lib/esm/util/isFileLike.js

10 lines
327 B
JavaScript
Raw Normal View History

2024-05-01 02:46:10 +01:00
import isFunction from "./isFunction.js";
export const isFileLike = (value) => Boolean(value
&& typeof value === "object"
&& isFunction(value.constructor)
&& value[Symbol.toStringTag] === "File"
&& isFunction(value.stream)
&& value.name != null
&& value.size != null
&& value.lastModified != null);