<commit_before>/**
 * Clones a Object
 * @param {Object} object - Object that get's cloned
 * TODO: optimize this step
 */
export default function cloneObject(obj) {
	return JSON.parse(JSON.stringify(obj));
}<commit_msg>#35 added a real cloneObject function to improve performance<commit_after>/**
 * Clones a Object
 * @param {Object} object - Object that get's cloned
 * Taken from: http://heyjavascript.com/4-creative-ways-to-clone-objects/
 */
export default function cloneObject(obj) {
	if (obj === null || typeof obj !== 'object') {
		return obj;
	}
	var temp = obj.constructor();
	for (var key in obj) {
		temp[key] = cloneObject(obj[key]);
	}
	return temp;
}
{'fraction_non_alphanumeric': 0.14114114114114115, 'fraction_numerical': 0.0045045045045045045, 'mean_word_length': 4.251968503937008, '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': '6469448', 'n_tokens_mistral': 216, 'n_tokens_neox': 204, 'n_words': 67}