add is.formData

This commit is contained in:
kaysonwu 2021-09-11 18:07:50 +08:00
parent c6eac3ebd4
commit 28231663d1

View file

@ -432,6 +432,17 @@ Returns `true` if `value` is an odd integer.
Returns `true` if `value` can be used as an object property key (either `string`, `number`, or `symbol`).
##### .formData(value)
Returns `true` if `value` is an instance of the [`FormData` class](https://developer.mozilla.org/en-US/docs/Web/API/FormData).
```js
const data = new FormData();
is.formData(data);
//=> true
```
##### .any(predicate | predicate[], ...values)
Using a single `predicate` argument, returns `true` if **any** of the input `values` returns true in the `predicate`: