Add a JavaScript utility function for parsing query strings in URLs.
Review Request #9711 — Created March 1, 2018 and submitted — Latest diff uploaded
This introduces
Djblets.parseQueryString()
, which will take a query
string or a URL containing one and parse it. It understands key/value
pairs, standalone keys (which will be assigned the valuenull
), and
optionally supports storing multiple values for a key as an array.Unit tests were added that test all the standard query string cases.
Unit tests pass.
Used this in an upcoming change in Review Board.