Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: update has method and delete method
  • Loading branch information
sankalp1999 committed May 8, 2023
commit 3c1521fef26b003c5fe507ad2690e07878e79ca5
20 changes: 16 additions & 4 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -859,11 +859,15 @@ new URLSearchParams([

Append a new name-value pair to the query string.

#### `urlSearchParams.delete(name)`
#### `urlSearchParams.delete(name, value)`

Comment thread
anonrig marked this conversation as resolved.
* `name` {string}
* `value` {string}

If `value` is provided, then delete all name-value pairs with
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrasing should be consistent between the two paragraphs.

Suggested change
If `value` is provided, then delete all name-value pairs with
If `value` is provided, removes all name-value pairs with

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

whose `name` is name and `value` is value.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
whose `name` is name and `value` is value.
whose name is `name` and value is `value`.


Remove all name-value pairs whose name is `name`.
If `value` not provided, remove all name-value pairs whose name is `name`.
Comment thread
debadree25 marked this conversation as resolved.
Outdated

#### `urlSearchParams.entries()`

Expand Down Expand Up @@ -918,12 +922,20 @@ are no such pairs, `null` is returned.
Returns the values of all name-value pairs whose name is `name`. If there are
no such pairs, an empty array is returned.

#### `urlSearchParams.has(name)`
#### `urlSearchParams.has(name, value)`

* `name` {string}
* `value` {string}
* Returns: {boolean}

Returns `true` if there is at least one name-value pair whose name is `name`.
Checks if the `URLSearchParams` object contains key-value pair(s) based on
`name` and an optional `value` argument.

If `value` is provided, returns true when name-value pair with
Comment thread
sankalp1999 marked this conversation as resolved.
Outdated
same `name` and `value` exists.

If `value` is not provided, returns `true` if there is at least one name-value
pair whose name is `name`.

#### `urlSearchParams.keys()`

Expand Down