Closed
Description
// The following works (when I think it shouldn't)
var uri = URI('http://example.com:robots.txt');
// Even this works
console.log(uri.port()); // Will output 'robots.txt'
// This does not work however...
var uri = URI('http://example.com');
// ...since this will (correctly) throw an error
uri.port('robots.txt');
Could we look into adding the same validation of the URI port when constructing URI instances from strings as we have when calling the uri.port
method?