This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
Alternative to elm-param-parsing
version 1.0.0
license BSD3
native-modules False
elm-version 0.17.0 <= v < 0.18.0
Tag 1.0.0
Committed At 2016-08-28 04:29:22 UTC
evancz/elm-http 3.0.1 <= v < 4.0.0 3.0.1
elm-lang/core 4.0.0 <= v < 5.0.0 4.0.5




Ripped off from jessitron's library - there were just a few subtleties I thought were left out.

Query String Parsing

So this module parses URI query strings - specifically strings that begin with the character ?, and are a &-separated list of substrings, which themselves may be split via a =. The string in question should also be ASCII (check me on this), encoded as a x-www-urlencoded MIME type.

To parse such a string, just feed it into parseQuery:

parseQuery "?foo=bar&baz&qux=1"
> [("foo", Just "bar"), ("baz", Nothing), ("qux", Just "1")]

I believe the type List (String, Maybe String) is more precise than a Dict for a number of reasons, which I detail in the docs. Happy hacking!