node-ejs-renderer/node_modules/form-data-encoder/lib/esm/util/isFormData.js
2024-06-09 13:55:01 -04:00

10 lines
361 B
JavaScript

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;