joyent/node — pull request #4576 by fb55 (2013-01-12 16:22:27+00:00)
Title: url: Housekeeping

__Contents:__

- rearranged Url.prototype.format (same as #3291, just without the regression and including all updates)
- use appropriate string functions (eg. use `RegExp#test` instead of `.match`, prefer calling `.split` with a string when it's possible)
- simplified parts of Url.prototype.resolveObject
- simplified regexps
- use a labeled block instead of a bool for auth data

__Results:__

A [quick test](https://gist.github.com/8c07e29b75ee1875b950) shows consistent speedups. All tests in [simple/test-url.js](https://github.com/joyent/node/blob/54d293da560a86e48b302c0ef219ac6e38a9a1e9/test/simple/test-url.js) pass. Plus, the code is (at least in my opinion) a bit more readable.