Uri.js
function parseUri(str) {
    var parser = re.uri_parser;
    var parserKeys = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "isColonUri", "relative", "path", "directory", "file", "query", "anchor"];
    var m = parser.exec(str || '');
    var parts = {};

    parserKeys.forEach(function(key, i) {
      parts[key] = m[i] || '';
    });

    return parts;
  }
function parseUri(str) {
    var parser = re.uri_parser;
    var parserKeys = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "isColonUri", "relative", "path", "directory", "file", "query", "anchor"];
    var m = parser.exec(str || '');
    var parts = {};

    parserKeys.forEach(function(key, i) {
      parts[key] = m[i] || '';
    });

    return parts;
  }
function parseUri ( str ) { var parser = re . uri_parser ; var parserKeys = [ "source" , "protocol" , "authority" , "userInfo" , "user" , "password" , "host" , "port" , "isColonUri" , "relative" , "path" , "directory" , "file" , "query" , "anchor" ] ; var m = parser . exec ( str || '' ) ; var parts = { } ; parserKeys . forEach ( function ( key , i ) { parts [ key ] = m [ i ] || '' ; } ) ; return parts ; }
Breaks a uri string down into its individual parts
@param  {string} str uri
@return {object}     parts
Breaks a uri string down into its individual parts