<commit_before>Vue.filter('remove-whitespace', (attr) => {
    return attr.replace(/,/g, ' ');
});

Vue.filter('join-attrs', (attrs, name, sep) => {
    var temp = [];
    attrs.forEach((item) => {
        temp.push(item[!name ? 'attr' : name]);
    });
    return temp.join(!sep ? ' ' : sep);
});
<commit_msg>support when attr is a string<commit_after>Vue.filter('remove-whitespace', (attr) => {
    return attr.replace(/,/g, ' ');
});

Vue.filter('join-attrs', (attrs, name, sep) => {
    var temp = [];
    attrs.forEach((item) => {
        var result = item[!name ? 'attr' : name];
        if (!result) {
            result = item;
        }
        temp.push(result);
    });
    return temp.join(!sep ? ' ' : sep);
});

{'fraction_non_alphanumeric': 0.22482758620689655, 'fraction_numerical': 0.0, 'mean_word_length': 2.5763546798029555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2069561', 'n_tokens_mistral': 255, 'n_tokens_neox': 254, 'n_words': 46}