src/aja.js
function(params){
            var object = {};
            if(typeof params === 'string'){

                params.replace('?', '').split('&').forEach(function(kv){
                    var pair = kv.split('=');
                    if(pair.length === 2){
                        object[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
                    }
                });
            } else {
                object = params;
            }
            return this.plainObject(object);
        }
function(params){
            var object = {};
            if(typeof params === 'string'){

                params.replace('?', '').split('&').forEach(function(kv){
                    var pair = kv.split('=');
                    if(pair.length === 2){
                        object[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
                    }
                });
            } else {
                object = params;
            }
            return this.plainObject(object);
        }
function ( params ) { var object = { } ; if ( typeof params === 'string' ) { params . replace ( '?' , '' ) . split ( '&' ) . forEach ( function ( kv ) { var pair = kv . split ( '=' ) ; if ( pair . length === 2 ) { object [ decodeURIComponent ( pair [ 0 ] ) ] = decodeURIComponent ( pair [ 1 ] ) ; } } ) ; } else { object = params ; } return this . plainObject ( object ) ; }
Check the queryString, and create an object if a string is given.

@param {String|Object} params
@returns {Object} key/value based queryString
@throws {TypeError} if wrong params type or if the string isn't parseable
Check the queryString and create an object if a string is given .