Parsing query-string does not retain the strict order of the query-string parameters. This becomes a problem when you reconstruct the query-string from a parsed query-params map.
One option could be to expose an ordered? field. Based on the field we would then use a hash-map (like we do now) or an insertion-order-based map (such as clj-commons/ordered). Like so:
Another option could be to expose a parameter to provide the map implementation for uri/query-string->map, say, using a :ordering-strategy. This would especially be a more viable option if keeping this library light for the cljs side is a primary consideration.
If this makes sense and we can agree on the approach, I might be able to have some time to work on this.
Parsing query-string does not retain the strict order of the query-string parameters. This becomes a problem when you reconstruct the query-string from a parsed query-params map.
Example:
One option could be to expose an
ordered?
field. Based on the field we would then use a hash-map (like we do now) or an insertion-order-based map (such as clj-commons/ordered). Like so:Another option could be to expose a parameter to provide the map implementation for
uri/query-string->map
, say, using a:ordering-strategy
. This would especially be a more viable option if keeping this library light for the cljs side is a primary consideration.If this makes sense and we can agree on the approach, I might be able to have some time to work on this.