<commit_before>
function detect(data){
	var os = platform.os.family;
	if(os.lastIndexOf('iOS', 0) === 0){
		window.location.replace('https://itunes.apple.com/app/' + data.Item.itunes.S)
	}
	else if(os.lastIndexOf('Android', 0) === 0){
		window.location.replace('https://play.google.com/store/apps/details?id=' + data.Item.google_play.S)
	}
	else{
		document.write(os)
	}
}<commit_msg>check existence of relevant data; redirect to homepage (?)<commit_after>
function detect(data){
	var unded = "undefined";
	var os = platform.os.family;
    /* Common values include:
    * "Windows", "Windows Server 2008 R2 / 7", "Windows Server 2008 / Vista",
    * "Windows XP", "OS X", "Ubuntu", "Debian", "Fedora", "Red Hat", "SuSE",
    * "Android", "iOS" and "Windows Phone"
	*/
	if((os.lastIndexOf('iOS', 0) === 0) && (typeof(data.Item.itunes) != undef){
		window.location.replace('https://itunes.apple.com/app/' + data.Item.itunes.S);
	}
	else if((os.lastIndexOf('Android', 0) === 0) && (typeof(data.Item.google_play) != undef)){
		window.location.replace('https://play.google.com/store/apps/details?id=' + data.Item.google_play.S);
	}
	else{
		window.location.replace('/');
	}
}
{'fraction_non_alphanumeric': 0.2076923076923077, 'fraction_numerical': 0.015384615384615385, 'mean_word_length': 4.322727272727272, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '1017603', 'n_tokens_mistral': 456, 'n_tokens_neox': 418, 'n_words': 81}