<commit_before><commit_msg>added utils.js<commit_after>/**
 * Writes the filter function for objects.
 * @param {function} predicate is the function which keys/properties must match.
 */
Object.filter = (obj, predicate) =>
    Object.keys(obj)
    .filter(key => predicate(obj[ key ]))
    .reduce((res, key) => (res[ key ] = obj[ key ], res), {});

{'fraction_non_alphanumeric': 0.16905444126074498, 'fraction_numerical': 0.0, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '3898302', 'n_tokens_mistral': 111, 'n_tokens_neox': 108, 'n_words': 32}