fix variable name
This commit is contained in:
parent
26d668c9f1
commit
b1fd48b6b4
2 changed files with 5 additions and 5 deletions
|
|
@ -448,9 +448,9 @@ is.formData(data);
|
||||||
Returns `true` if `value` is an instance of the [`URLSearchParams` class](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams).
|
Returns `true` if `value` is an instance of the [`URLSearchParams` class](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams).
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const data = new URLSearchParams();
|
const searchParams = new URLSearchParams();
|
||||||
|
|
||||||
is.urlSearchParams(data);
|
is.urlSearchParams(searchParams);
|
||||||
//=> true
|
//=> true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1643,14 +1643,14 @@ test('is.formData', t => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('is.urlSearchParams', t => {
|
test('is.urlSearchParams', t => {
|
||||||
const params = new window.URLSearchParams();
|
const searchParams = new URLSearchParams();
|
||||||
t.true(is.urlSearchParams(params));
|
t.true(is.urlSearchParams(searchParams));
|
||||||
t.false(is.urlSearchParams({}));
|
t.false(is.urlSearchParams({}));
|
||||||
t.false(is.urlSearchParams(undefined));
|
t.false(is.urlSearchParams(undefined));
|
||||||
t.false(is.urlSearchParams(null));
|
t.false(is.urlSearchParams(null));
|
||||||
|
|
||||||
t.notThrows(() => {
|
t.notThrows(() => {
|
||||||
assert.urlSearchParams(params);
|
assert.urlSearchParams(searchParams);
|
||||||
});
|
});
|
||||||
t.throws(() => {
|
t.throws(() => {
|
||||||
assert.urlSearchParams({});
|
assert.urlSearchParams({});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue