URLSearchParams

open external class URLSearchParams(init: ReadonlyArray<JsTuple2<String, String>> = definedExternally) : ReadonlyMap<String, String> (source)

MDN Reference

Constructors

Link copied to clipboard
constructor(init: ReadonlyRecord<String, String>)
constructor(init: String)
constructor(init: URLSearchParams)
constructor(init: ReadonlyArray<JsTuple2<String, String>> = definedExternally)

Properties

Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard
fun append(key: String, value: String)

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

Link copied to clipboard
fun delete(key: String, value: String = definedExternally)

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

Link copied to clipboard
open override fun entries(): JsIterator<JsTuple2<String, String>>
Link copied to clipboard
open override fun forEach(action: (value: String, key: String) -> Unit)
Link copied to clipboard
open operator fun get(key: Symbol.iterator): () -> JsIterator<JsTuple2<String, String>>

open operator override fun get(key: String): String?

Returns the first value associated to the given search parameter.

Link copied to clipboard

Returns all the values association with a given search parameter.

Link copied to clipboard
open override fun has(key: String): Boolean

Returns a Boolean indicating if such a search parameter exists.

fun has(key: String, value: String): Boolean
Link copied to clipboard
open inline operator fun iterator(): Iterator<JsTuple2<String, String>>
Link copied to clipboard
open override fun keys(): JsIterator<String>
Link copied to clipboard
operator fun set(key: String, value: String)

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

Link copied to clipboard
Link copied to clipboard
open override fun values(): JsIterator<String>