URL
URLSearchParams.delete()
Deletes all entries for a name, or only entries matching the supplied value on this runtime. Tested on Node.js 22.16.0. Example output (one line per entry): ["tag=b"].
Formal Syntax & Structure
nodejs syntaxnodejs
params.delete(name[, value])Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Parameter name. |
| value | string | Specific value to match. |
Return Value
undefined
Mutates collection.
Working Example
Example Snippetnodejs
const p = new URLSearchParams('tag=a&tag=b&tag=a');p.delete('tag', 'a');console.log(p.toString());