10 lines
361 B
JavaScript
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;
|