Module for an url parsing.
modules.require(['uri'], function(Uri) {
    // Parse url
    var u = Uri.parse('http://example.org:8080/path?test=1&test=2¶m2=22');
    // Change port
    u.setPort(80);
    // Change query params
    u.deleteParam('test', '2');
    u.replaceParam('param2', 2);
    // Serialize url
    u.toString(); // "http://example.org:8080/path?test=1¶m2=2"
});