src/utils.js
function parseUri(uri) {
	var parts = uri.match(/^(?:([\w+.-]+):\/\/([^/]+))?([^?#]*)?(\?[^#]*)?(#.*)?/);

	return {
		protocol: parts[1] || '',
		host: parts[2] || '',
		path: parts[3] || '',
		qs: parts[4] || '',
		hash: parts[5] || ''
	};
}
function parseUri(uri) {
	var parts = uri.match(/^(?:([\w+.-]+):\/\/([^/]+))?([^?#]*)?(\?[^#]*)?(#.*)?/);

	return {
		protocol: parts[1] || '',
		host: parts[2] || '',
		path: parts[3] || '',
		qs: parts[4] || '',
		hash: parts[5] || ''
	};
}
Parse URI

@param {String} uri
@returns {{protocol: string, host: string, path: string, qs: string, hash: string}}
@private