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

10 lines
361 B
JavaScript
Raw Normal View History

2023-09-25 15:58:56 +08: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;