<commit_before>VideoStream.utils.loadFileFromURL = function(file, dir = '.'){
	if(!file){
		return new Promise(function(resolve){resolve(null);});
	}
	var path = file;
	if(file.startsWith('/') == false && file.startsWith(/((http(s)?)|(file)):\/\//) == false){
		path = dir.endsWith('/') ? dir + file : dir + '/' + file;
	}
	
	return new Promise(function(resolve, reject){
		var xhr = new XMLHttpRequest();
		
		xhr.onreadystatechange = function(){
			if(this.readyState == 4){
				if(this.status == 200){
					resolve(this.responseText);
				}
				else{
					reject(this.status, this);
				}
			}
		};<commit_msg>Fix regex string startsWith wrong function use<commit_after>VideoStream.utils.loadFileFromURL = function(file, dir = '.'){
	if(!file){
		return new Promise(function(resolve){resolve(null);});
	}
	var path = file;
	if(file.startsWith('/') == false && /^((http(s)?)|(file)):\/\//i.test(file) == false){
		path = dir.endsWith('/') ? dir + file : dir + '/' + file;
	}
	
	return new Promise(function(resolve, reject){
		var xhr = new XMLHttpRequest();
		
		xhr.onreadystatechange = function(){
			if(this.readyState == 4){
				if(this.status == 200){
					resolve(this.responseText);
				}
				else{
					reject(this.status, this);
				}
			}
		};
{'fraction_non_alphanumeric': 0.19840637450199203, 'fraction_numerical': 0.006374501992031873, 'mean_word_length': 3.5672727272727274, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1275136', 'n_tokens_mistral': 504, 'n_tokens_neox': 428, 'n_words': 82}