lib/abaaso.js
function ( uri ) {
		var obj    = {},
		    parsed = {};

		if ( uri === undefined ) {
			uri = !server ? location.href : "";
		}

		if ( !server ) {
			obj = document.createElement( "a" );
			obj.href = uri;
		}
		else {
			obj = url.parse( uri );
		}

		if ( server ) {
			utility.iterate( obj, function ( v, k ) {
				if ( v === null ) {
					obj[k] = undefined;
				}
			});
		}

		parsed = {
			auth     : server ? null : regex.auth.exec( uri ),
			protocol : obj.protocol || "http:",
			hostname : obj.hostname || "localhost",
			port     : obj.port ? number.parse( obj.port, 10 ) : "",
			pathname : obj.pathname,
			search   : obj.search   || "",
			hash     : obj.hash     || "",
			host     : obj.host     || "localhost"
		};

		// 'cause IE is ... IE; required for data.batch()
		if ( client.ie ) {
			if ( parsed.protocol === ":" ) {
				parsed.protocol = location.protocol;
			}

			if ( string.isEmpty( parsed.hostname ) ) {
				parsed.hostname = location.hostname;
			}

			if ( string.isEmpty( parsed.host ) ) {
				parsed.host = location.host;
			}

			if ( parsed.pathname.charAt( 0 ) !== "/" ) {
				parsed.pathname = "/" + parsed.pathname;
			}
		}

		parsed.auth  = obj.auth || ( parsed.auth === null ? "" : parsed.auth[1] );
		parsed.href  = obj.href || ( parsed.protocol + "//" + ( string.isEmpty( parsed.auth ) ? "" : parsed.auth + "@" ) + parsed.host + parsed.pathname + parsed.search + parsed.hash );
		parsed.path  = obj.path || parsed.pathname + parsed.search;
		parsed.query = utility.queryString( null, parsed.search );

		return parsed;
	}
function ( uri ) {
		var obj    = {},
		    parsed = {};

		if ( uri === undefined ) {
			uri = !server ? location.href : "";
		}

		if ( !server ) {
			obj = document.createElement( "a" );
			obj.href = uri;
		}
		else {
			obj = url.parse( uri );
		}

		if ( server ) {
			utility.iterate( obj, function ( v, k ) {
				if ( v === null ) {
					obj[k] = undefined;
				}
			});
		}

		parsed = {
			auth     : server ? null : regex.auth.exec( uri ),
			protocol : obj.protocol || "http:",
			hostname : obj.hostname || "localhost",
			port     : obj.port ? number.parse( obj.port, 10 ) : "",
			pathname : obj.pathname,
			search   : obj.search   || "",
			hash     : obj.hash     || "",
			host     : obj.host     || "localhost"
		};

		// 'cause IE is ... IE; required for data.batch()
		if ( client.ie ) {
			if ( parsed.protocol === ":" ) {
				parsed.protocol = location.protocol;
			}

			if ( string.isEmpty( parsed.hostname ) ) {
				parsed.hostname = location.hostname;
			}

			if ( string.isEmpty( parsed.host ) ) {
				parsed.host = location.host;
			}

			if ( parsed.pathname.charAt( 0 ) !== "/" ) {
				parsed.pathname = "/" + parsed.pathname;
			}
		}

		parsed.auth  = obj.auth || ( parsed.auth === null ? "" : parsed.auth[1] );
		parsed.href  = obj.href || ( parsed.protocol + "//" + ( string.isEmpty( parsed.auth ) ? "" : parsed.auth + "@" ) + parsed.host + parsed.pathname + parsed.search + parsed.hash );
		parsed.path  = obj.path || parsed.pathname + parsed.search;
		parsed.query = utility.queryString( null, parsed.search );

		return parsed;
	}
function ( uri ) { var obj = { } , parsed = { } ; if ( uri === undefined ) { uri = ! server ? location . href : "" ; } if ( ! server ) { obj = document . createElement ( "a" ) ; obj . href = uri ; } else { obj = url . parse ( uri ) ; } if ( server ) { utility . iterate ( obj , function ( v , k ) { if ( v === null ) { obj [ k ] = undefined ; } } ) ; } parsed = { auth : server ? null : regex . auth . exec ( uri ) , protocol : obj . protocol || "http:" , hostname : obj . hostname || "localhost" , port : obj . port ? number . parse ( obj . port , 10 ) : "" , pathname : obj . pathname , search : obj . search || "" , hash : obj . hash || "" , host : obj . host || "localhost" } ; // 'cause IE is ... IE; required for data.batch() if ( client . ie ) { if ( parsed . protocol === ":" ) { parsed . protocol = location . protocol ; } if ( string . isEmpty ( parsed . hostname ) ) { parsed . hostname = location . hostname ; } if ( string . isEmpty ( parsed . host ) ) { parsed . host = location . host ; } if ( parsed . pathname . charAt ( 0 ) !== "/" ) { parsed . pathname = "/" + parsed . pathname ; } } parsed . auth = obj . auth || ( parsed . auth === null ? "" : parsed . auth [ 1 ] ) ; parsed . href = obj . href || ( parsed . protocol + "//" + ( string . isEmpty ( parsed . auth ) ? "" : parsed . auth + "@" ) + parsed . host + parsed . pathname + parsed . search + parsed . hash ) ; parsed . path = obj . path || parsed . pathname + parsed . search ; parsed . query = utility . queryString ( null , parsed . search ) ; return parsed ; }
Parses a URI into an Object

@method parse
@param  {String} uri URI to parse
@return {Object}     Parsed URI
Parses a URI into an Object