URLSearchParams
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3270
The URLSearchParams interface defines utility methods to work with the query string of a URL.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new URLSearchParams(
init?):URLSearchParams
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3271
Parameters
Section titled “Parameters”string | URLSearchParams | Record<string, string> | [string, string][]
Returns
Section titled “Returns”URLSearchParams
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get size():
number
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3283
The size read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”[iterator]()
Section titled “[iterator]()”[iterator]():
IterableIterator<[string,string]>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3343
Returns
Section titled “Returns”IterableIterator<[string, string]>
append()
Section titled “append()”append(
name,value):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3289
The append() method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”void
delete()
Section titled “delete()”delete(
name):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3295
The delete() method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
entries()
Section titled “entries()”entries():
IterableIterator<[string,string]>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3327
Returns
Section titled “Returns”IterableIterator<[string, string]>
forEach()
Section titled “forEach()”forEach<
This>(callback,thisArg?):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3332
Type Parameters
Section titled “Type Parameters”This = unknown
Parameters
Section titled “Parameters”callback
Section titled “callback”(this, value, key, parent) => void
thisArg?
Section titled “thisArg?”This
Returns
Section titled “Returns”void
get(
name):null|string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3301
The get() method of the URLSearchParams interface returns the first value associated to the given search parameter.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”null | string
getAll()
Section titled “getAll()”getAll(
name):string[]
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3307
The getAll() method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string[]
has(
name):boolean
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3313
The has() method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
keys()
Section titled “keys()”keys():
IterableIterator<string>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3329
Returns
Section titled “Returns”IterableIterator<string>
set(
name,value):void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3319
The set() method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”void
sort()
Section titled “sort()”sort():
void
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3325
The URLSearchParams.sort() method sorts all key/value pairs contained in this object in place and returns undefined.
Returns
Section titled “Returns”void
toString()
Section titled “toString()”toString():
string
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3342
Returns
Section titled “Returns”string
values()
Section titled “values()”values():
IterableIterator<string>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3331
Returns
Section titled “Returns”IterableIterator<string>