Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

URLSearchParams

interface URLSearchParams {
[[Symbol.iterator]](): IterableIterator<[string, string]>;
append(name: string, value: string): void;
delete(name: string): void;
entries(): IterableIterator<[string, string]>;
forEach(callbackfn: (
value: string,
key: string,
) => void
, thisArg?: any): void;
get(name: string): string | null;
getAll(name: string): string[];
has(name: string): boolean;
keys(): IterableIterator<string>;
set(name: string, value: string): void;
sort(): void;
toString(): string;
values(): IterableIterator<string>;
}
var URLSearchParams: {
prototype: URLSearchParams;
new (init?:
| string[][]
| Record<string, string>
| string
): URLSearchParams;
toString(): string;
}
;

§Methods

§
[[Symbol.iterator]](): IterableIterator<[string, string]>
[src]
§
append(name: string, value: string): void
[src]

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

§
delete(name: string): void
[src]

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

§
entries(): IterableIterator<[string, string]>
[src]

Returns an array of key, value pairs for every entry in the search params.

§
forEach(callbackfn: (
value: string,
key: string,
) => void
, thisArg?: any): void
[src]
§
get(name: string): string | null
[src]

Returns the first value associated to the given search parameter.

§
getAll(name: string): string[]
[src]

Returns all the values association with a given search parameter.

§
has(name: string): boolean
[src]

Returns a Boolean indicating if such a search parameter exists.

§
keys(): IterableIterator<string>
[src]

Returns a list of keys in the search params.

§
set(name: string, value: string): void
[src]

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

§
sort(): void
[src]
§
toString(): string
[src]

Returns a string containing a query string suitable for use in a URL. Does not include the question mark.

§
values(): IterableIterator<string>
[src]

Returns a list of values in the search params.