for more information visit the package's GitHub page
Package contains the following modules:
An opinionated query string parser for Elm. Based on https://github.com/ljharb/qs
QS users []
for lists.
E.g.
?ids[]=1&ids[]=2
Convert a query string to a QS.Query
QS.parse
QS.config
"?a=1&b=x"
== Dict.fromList
[ ( "a", One <| Number 1 )
, ( "b", One <| Str "x" )
]
Convert a QS.Query to a query string
query =
Dict.fromList
[ ( "a", QueryString "1" )
, ( "b", QueryString "2" )
]
QS.serialize
Qs.config
query
==
"?a=1&b=2"
Convert JSON to a QS.Query
json =
"""{"a":["x", 1, true]}"""
Decode.decodeString QS.decoder json
Convert a QS.Query to JSON
query =
Many [ Str "x", Boolean True ] )
encodedQuery =
QS.encode query
Encode.encode 0 encodedQuery
Function for getting, setting, removing keys in the query. See the documentation.