agsamantha/node_modules/form-data-encoder/lib/esm/util/isFormData.js

10 lines
361 B
JavaScript
Raw Normal View History

2024-10-02 15:15:21 -05:00
import isFunction from "./isFunction.js";
export const isFormData = (value) => Boolean(value
&& isFunction(value.constructor)
&& value[Symbol.toStringTag] === "FormData"
&& isFunction(value.append)
&& isFunction(value.getAll)
&& isFunction(value.entries)
&& isFunction(value[Symbol.iterator]));
export const isFormDataLike = isFormData;