lib/abaaso.js
function ( arg, qstring ) {
		var obj    = {},
		    result = qstring !== undefined ? ( qstring.indexOf( "?" ) > -1 ? qstring.replace( /.*\?/, "" ) : null) : ( server || string.isEmpty( location.search ) ? null : location.search.replace( "?", "" ) );

		if ( result !== null && !string.isEmpty( result ) ) {
			result = result.split( "&" );
			array.each( result, function (prop ) {
				var item = prop.split( "=" );

				if ( string.isEmpty( item[0] ) ) {
					return;
				}

				if ( item[1] === undefined ) {
					item[1] = "";
				}
				else {
					item[1] = utility.coerce( decodeURIComponent( item[1] ) );
				}

				if ( obj[item[0]] === undefined ) {
					obj[item[0]] = item[1];
				}
				else if ( !(obj[item[0]] instanceof Array) ) {
					obj[item[0]] = [obj[item[0]]];
					obj[item[0]].push( item[1] );
				}
				else {
					obj[item[0]].push( item[1] );
				}
			});
		}

		if ( arg !== null && arg !== undefined ) {
			obj = obj[arg];
		}

		return obj;
	}
function ( arg, qstring ) {
		var obj    = {},
		    result = qstring !== undefined ? ( qstring.indexOf( "?" ) > -1 ? qstring.replace( /.*\?/, "" ) : null) : ( server || string.isEmpty( location.search ) ? null : location.search.replace( "?", "" ) );

		if ( result !== null && !string.isEmpty( result ) ) {
			result = result.split( "&" );
			array.each( result, function (prop ) {
				var item = prop.split( "=" );

				if ( string.isEmpty( item[0] ) ) {
					return;
				}

				if ( item[1] === undefined ) {
					item[1] = "";
				}
				else {
					item[1] = utility.coerce( decodeURIComponent( item[1] ) );
				}

				if ( obj[item[0]] === undefined ) {
					obj[item[0]] = item[1];
				}
				else if ( !(obj[item[0]] instanceof Array) ) {
					obj[item[0]] = [obj[item[0]]];
					obj[item[0]].push( item[1] );
				}
				else {
					obj[item[0]].push( item[1] );
				}
			});
		}

		if ( arg !== null && arg !== undefined ) {
			obj = obj[arg];
		}

		return obj;
	}
function ( arg , qstring ) { var obj = { } , result = qstring !== undefined ? ( qstring . indexOf ( "?" ) > - 1 ? qstring . replace ( / .*\? / , "" ) : null ) : ( server || string . isEmpty ( location . search ) ? null : location . search . replace ( "?" , "" ) ) ; if ( result !== null && ! string . isEmpty ( result ) ) { result = result . split ( "&" ) ; array . each ( result , function ( prop ) { var item = prop . split ( "=" ) ; if ( string . isEmpty ( item [ 0 ] ) ) { return ; } if ( item [ 1 ] === undefined ) { item [ 1 ] = "" ; } else { item [ 1 ] = utility . coerce ( decodeURIComponent ( item [ 1 ] ) ) ; } if ( obj [ item [ 0 ] ] === undefined ) { obj [ item [ 0 ] ] = item [ 1 ] ; } else if ( ! ( obj [ item [ 0 ] ] instanceof Array ) ) { obj [ item [ 0 ] ] = [ obj [ item [ 0 ] ] ] ; obj [ item [ 0 ] ] . push ( item [ 1 ] ) ; } else { obj [ item [ 0 ] ] . push ( item [ 1 ] ) ; } } ) ; } if ( arg !== null && arg !== undefined ) { obj = obj [ arg ] ; } return obj ; }
Parses a query string & coerces values

@method queryString
@param  {String} arg     [Optional] Key to find in the querystring
@param  {String} qstring [Optional] Query string to parse
@return {Mixed}          Value or Object of key:value pairs
Parses a query string & coerces values