http://medialize.github.io/URI.js/
https://github.com/garycourt/uri-js

>TL;DR: It's a mess.