<commit_before>"use strict";

const split = str => str.split("");

const reduce = val =>
       val.length === 0
       ? ""
       : val.reduce((a, b) => a === b ? a : "");

const isRepeated = str => Boolean(reduce(split(str)));

module.exports = isRepeated;
<commit_msg>melhora correção de erro com strings vazias<commit_after>"use strict";

const split = str => str ? str.split("") : [""];

const reduce = val => val.reduce((a, b) => a === b ? a : "");

const isRepeated = str => Boolean(reduce(split(str)));

module.exports = isRepeated;

{'fraction_non_alphanumeric': 0.1992619926199262, 'fraction_numerical': 0.0018450184501845018, 'mean_word_length': 3.641025641025641, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4406263', 'n_tokens_mistral': 180, 'n_tokens_neox': 181, 'n_words': 49}