URLSearchParams.prototype.has - Node documentation
method URLSearchParams.prototype.has

Usage in Deno

import { URLSearchParams } from "node:url";
URLSearchParams.prototype.has(
name: string,
value?: string,
): boolean

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 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.

Parameters

name: string
optional
value: string

Return Type

boolean