<commit_before>/**
 * @param {number} n
 * @return {boolean}
 */
var isHappy = function(n) {
  var mem = [];

  while (true) {
    var arr = n.toString().split('');
    console.log(arr)

    n = arr.reduce(function (pre, current) {
      current = parseInt(current);
      return pre + current * current;
    }, 0)
    console.log(n)

    if (n === 1) return true;
    if (mem.indexOf(n) !== -1) {
      return false;
    }
<commit_msg>rm console<commit_after>/**
 * @param {number} n
 * @return {boolean}
 */
var isHappy = function(n) {
  var mem = [];

  while (true) {
    var arr = n.toString().split('');

    n = arr.reduce(function (pre, current) {
      current = parseInt(current);
      return pre + current * current;
    }, 0);

    if (n === 1) return true;
    if (mem.indexOf(n) !== -1) {
      return false;
    }

{'fraction_non_alphanumeric': 0.1819277108433735, 'fraction_numerical': 0.007228915662650603, 'mean_word_length': 2.4057377049180326, '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': '4069029', 'n_tokens_mistral': 296, 'n_tokens_neox': 285, 'n_words': 77}