<commit_before><commit_msg>Solved kata 'Sum of Digits / Digital Root'. http://www.codewars.com/kata/541c8630095125aba6000c00/solutions/javascript<commit_after>/**
 * Sum of Digits / Digital Root
 * http://www.codewars.com/kata/541c8630095125aba6000c00/train/javascript
 */
function digital_root(n) {
	while (n > 9) {
		n = n.toString().split('').reduce(function(res, c) {
			return res + parseInt(c, 10);
		}, 0);
	}
	return n;
}
{'fraction_non_alphanumeric': 0.16317016317016317, 'fraction_numerical': 0.0979020979020979, 'mean_word_length': 4.375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5701182', 'n_tokens_mistral': 193, 'n_tokens_neox': 163, 'n_words': 29}