<commit_before>function qsObject(qs){
	qs = (typeof qs === "undefined") ? window.location.href.slice(window.location.href.indexOf('?') + 1) : qs.replace('?','');
	/* Create an array of name value pairs from query string. 
	[show_tabs=overview, highlight=1] */
	if ( qs === window.location.href ) {
		return false;
	}
	var qsArray = qs.split('#');
	var qsParams = qsArray[0].split('&');
	var qsId = qsArray[1];
	var qsObj = {};
	for( i = 0; i < qsParams.length; ++i ){
		/*create name value pairs and add them to a querystring object.
		{"show_tabs":"overview", "highlight":"1"}*/
		var tempArr = qsParams[i].split('=');
		qsObj[tempArr[0]] = (typeof tempArr[1] === "undefined") ? "" : tempArr[1];
	};
	if(qsId !== undefined && qsId != ''){
		qsObj['Id'] = qsId;
	}

	return qsObj;
}<commit_msg>add support for query strings with multiple instances of the same key.<commit_after>function qsObject(qs){
	qs = (typeof qs === "undefined") ? window.location.href.slice(window.location.href.indexOf('?') + 1) : qs.replace('?','');
	/* Create an array of name value pairs from query string. 
	[show_tabs=overview, highlight=1] */
	if ( qs === window.location.href ) {
		return false;
	}
	var qsArray = qs.split('#');
	var qsParams = qsArray[0].split('&');
	var qsId = qsArray[1];
	var qsObj = {};
	for( i = 0; i < qsParams.length; ++i ){
		/*create name value pairs and add them to a querystring object.
		{"show_tabs":"overview", "highlight":"1"}*/
		var tempArr = qsParams[i].split('=');
		// test if the key already existsin the object.
		if( !(tempArr[0] in qsObj) ){
			//add key if it doesn't exist
			qsObj[tempArr[0]] = (typeof tempArr[1] === "undefined") ? "" : tempArr[1];
		} else {
			// test if the key's value is already an array (multiple values)
			if ( (typeof(qsObj[tempArr[0]] === "object") && (qsObj[tempArr[0]] instanceof Array) ) ){
				// add value to the key's array
				qsObj[tempArr[0]].push(tempArr[1]);
			} else {
				// convert the current single value to an array, then add the new value.
				qsObj[tempArr[0]] = [ qsObj[tempArr[0]], tempArr[1] ];
			}
		}
	};
	if(qsId !== undefined && qsId != ''){
		qsObj['Id'] = qsId;
	}

	return qsObj;
}
{'fraction_non_alphanumeric': 0.19298245614035087, 'fraction_numerical': 0.012003693444136657, 'mean_word_length': 3.8478747203579418, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2697977', 'n_tokens_mistral': 843, 'n_tokens_neox': 784, 'n_words': 213}