Skip to main content
Module

x/deno/js/dom_types.ts>URLSearchParams

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface URLSearchParams
import { type URLSearchParams } from "https://deno.land/x/deno@v0.1.12/js/dom_types.ts";

Methods

append(name: string, value: string): void

Appends a specified key/value pair as a new search parameter.

delete(name: string): void

Deletes the given search parameter, and its associated value, from the list of all search parameters.

get(name: string): string | null

Returns the first value associated to the given search parameter.

getAll(name: string): string[]

Returns all the values association with a given search parameter.

has(name: string): boolean

Returns a Boolean indicating if such a search parameter exists.

set(name: string, value: string): void

Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.

sort(): void

Sort all key/value pairs contained in this object in place and return undefined. The sort order is according to Unicode code points of the keys.

toString(): string

Returns a query string suitable for use in a URL.

forEach(callbackfn: (
value: string,
key: string,
) => void
, thisArg?: any
): void

Iterates over each name-value pair in the query and invokes the given function.