<commit_before>/**
 * module  DOM/manipulate
 	- basic method to manipulate DOMElements
 	- initialize all specified DOM related methods defined in previous modules
 */
 
;(function(K, NULL, undef){

function cleanClass(str){
	return str.replace(/\s+/g, ' ');
};

function hasClass(el, cls){
	return el.className.indexOf(cls) !== -1;
};

function addClass(cls){
	var el = this;
	
	if(!hasClass(el, cls)){
		el.className = cleanClass( el.className + ' ' + cls );
	}
};

function removeClass(cls){
	this.className = this.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)'), '$1');
};


function getStorage(el){
	var id = SELECTOR.uid(el);

	return data_storage[id] || (data_storage[id] = {});
};


// clear data stored in element
// clear attributes
function cleanElement(el){
	var id = SELECTOR.uid(el),
		dom = new DOM(el);
		
	dom.detach();
	
	el.clearAttributes && el.clearAttributes();
	
	K.each(storage, function(s){<commit_msg>dom/manipulate: fix spelling error about removeClass<commit_after>/**
 * module  DOM/manipulate
 	- basic method to manipulate DOMElements
 	- initialize all specified DOM related methods defined in previous modules
 */
 
;(function(K, NULL, undef){

function cleanClass(str){
	return str.replace(/\s+/g, ' ');
};

function hasClass(el, cls){
	return el.className.indexOf(cls) !== -1;
};

function addClass(cls){
	var el = this;
	
	if(!hasClass(el, cls)){
		el.className = cleanClass( el.className + ' ' + cls );
	}
};

function removeClass(cls){
	this.className = this.className.replace(new RegExp('(^|\\s)' + cls + '(?:\\s|$)'), '$1');
};


function getStorage(el){
	var id = SELECTOR.uid(el);

	return data_storage[id] || (data_storage[id] = {});
};


// clear data stored in element
// clear attributes
function cleanElement(el){
	var id = SELECTOR.uid(el),
		dom = new DOM(el);
		
	dom.detach();
	
	el.clearAttributes && el.clearAttributes();
	
	K.each(storage, function(s){
{'fraction_non_alphanumeric': 0.1755844155844156, 'fraction_numerical': 0.002077922077922078, 'mean_word_length': 4.163538873994638, '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': '3685435', 'n_tokens_mistral': 687, 'n_tokens_neox': 648, 'n_words': 160}