Module

Web.URL.URLSearchParams

Package
purescript-web-url
Repository
mjepronk/purescript-web-url

#fromString Source

fromString :: String -> URLSearchParams

Create a URLSearchParams from a string which will be parsed from application/x-www-form-urlencoded format. A leading '?' character is ignored.

#append Source

append :: String -> String -> URLSearchParams -> URLSearchParams

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

#delete Source

delete :: String -> URLSearchParams -> URLSearchParams

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

#entries Source

entries :: URLSearchParams -> Array (Tuple String String)

Returns an array of all key/value pairs contained in this object.

#get Source

get :: String -> URLSearchParams -> Maybe String

Returns the first value associated with the given search parameter.

#getAll Source

getAll :: String -> URLSearchParams -> Array String

Returns all the values associated with a given search parameter.

#has Source

has :: String -> URLSearchParams -> Boolean

Returns a Boolean indicating if such a given parameter exists.

#keys Source

keys :: URLSearchParams -> Array String

Returns an array of all keys of the key/value pairs contained in this object.

#set Source

set :: String -> String -> URLSearchParams -> URLSearchParams

Sets the value associated with a given search parameter to the given value. If there are several values, the others are deleted.

#sort Source

sort :: URLSearchParams -> URLSearchParams

Sorts all key/value pairs, if any, by their keys.

#toString Source

toString :: URLSearchParams -> String

Returns a string containing a query string suitable for use in a URL.

#values Source

values :: URLSearchParams -> Array String

Returns an array of all values of the key/value pairs contained in this object.