Skip to content

URLSearchParams

Types

t

type t = UrlTypes.urlSearchParams = {size: int}

Record fields

size
int

Values

append

Appends a specified key/value pair as a new search parameter. Read more on MDN

let append: (t, ~name: string, ~value: string) => unit

Parameters

t string string

Return type

unit

delete

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

let delete: (t, ~name: string, ~value: string=?) => unit

Parameters

t string option< string >

Return type

unit

entries

Returns key/value pairs in the same order as they appear in the query string. Read more on MDN

let entries: t => Iterator.t<(string, string)>

Parameters

t

Return type

Stdlib.Iterator.t

fromDict

let fromDict: dict<string> => t

Parameters

dict< string >

Return type

t

fromKeyValueArray

let fromKeyValueArray: array<(string, string)> => t

Parameters

array

Return type

t

fromString

let fromString: string => t

Parameters

string

Return type

t

get

Returns the first value associated to the given search parameter. Read more on MDN

let get: (t, string) => null<string>

Parameters

t string

Return type

Stdlib.null< string >

getAll

Returns all the values association with a given search parameter. Read more on MDN

let getAll: (t, string) => array<string>

Parameters

t string

Return type

array< string >

has

Returns a Boolean indicating if such a search parameter exists. Read more on MDN

let has: (t, ~name: string, ~value: string=?) => bool

Parameters

t string option< string >

Return type

bool

keys

Returns an iterator allowing iteration through all keys contained in this object. Read more on MDN

let keys: t => Iterator.t<string>

Parameters

t

Return type

Stdlib.Iterator.t< string >

make

let make: unit => t

Parameters

unit

Return type

t

set

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

let set: (t, ~name: string, ~value: string) => unit

Parameters

t string string

Return type

unit

sort

let sort: t => unit

Parameters

t

Return type

unit

toString

Returns the query string suitable for use in a WebApiURL, without the question mark. Read more on MDN

let toString: t => string

Parameters

t

Return type

string

values

Returns an iterator allowing iteration through all values contained in this object. Read more on MDN

let values: t => Iterator.t<string>

Parameters

t

Return type

Stdlib.Iterator.t< string >