lib/core.js
function(url){

	var retlist = [];

	// Pull parameters.
	var tmp = url.split('?');
	var path = '';
	var parms = [];
	if( ! tmp[1] ){ // catch bad url--nothing before '?'
	    parms = tmp[0].split('&');
	}else{ // normal structure
	    path = tmp[0];
	    parms = tmp[1].split('&');
	}

	// Decompose parameters.
	each(parms, function(p){
	    var c = _first_split('=', p);
	    if( ! c[0] && ! c[1] ){
		retlist.push([p]);
	    }else{
		retlist.push(c);		  
	    }
	});
	
	return retlist;
    }
function(url){

	var retlist = [];

	// Pull parameters.
	var tmp = url.split('?');
	var path = '';
	var parms = [];
	if( ! tmp[1] ){ // catch bad url--nothing before '?'
	    parms = tmp[0].split('&');
	}else{ // normal structure
	    path = tmp[0];
	    parms = tmp[1].split('&');
	}

	// Decompose parameters.
	each(parms, function(p){
	    var c = _first_split('=', p);
	    if( ! c[0] && ! c[1] ){
		retlist.push([p]);
	    }else{
		retlist.push(c);		  
	    }
	});
	
	return retlist;
    }
function ( url ) { var retlist = [ ] ; // Pull parameters. var tmp = url . split ( '?' ) ; var path = '' ; var parms = [ ] ; if ( ! tmp [ 1 ] ) { // catch bad url--nothing before '?' parms = tmp [ 0 ] . split ( '&' ) ; } else { // normal structure path = tmp [ 0 ] ; parms = tmp [ 1 ] . split ( '&' ) ; } // Decompose parameters. each ( parms , function ( p ) { var c = _first_split ( '=' , p ) ; if ( ! c [ 0 ] && ! c [ 1 ] ) { retlist . push ( [ p ] ) ; } else { retlist . push ( c ) ; } } ) ; return retlist ; }
Return the parameters part of a URL.

Unit tests make the edge cases clear.

@param {} url - url (or similar string)
@returns {Array} list of part lists
Return the parameters part of a URL .