Add a JavaScript utility function for parsing query strings in URLs.

Review Request #9711 — Created March 1, 2018 and submitted — Latest diff uploaded

Information

Djblets
release-1.0.x
9f5a114...

Reviewers

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 value null), 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.

Changes between revision 1 and 2

orig
1
2
3
djblets/static/djblets/js/utils/urls.es6.js
Loading...