Add a JavaScript utility function for parsing query strings in URLs.
Review Request #9711 — Created March 1, 2018 and submitted
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.
- Change Summary:
-
- Marked
options
as optional in the docs. - Removed an unnecessary check for
options
being defined.
- Marked
- Commit:
-
a7c8522e2134064339e9f0662c5c88b71b6210c364fe2a5f994afe595a69c86ef852a5ce64375f0c
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.