<commit_before>export const matches = (element, selector) => {

    if (element.matches) {
        return element.matches(selector);
    }

    if (element.msMatchesSelector) {
        return element.msMatchesSelector(selector);
    }

    throw new Error('`Element.matches` is not supported in this browser');
};

export const uniqueIdentifier = () => (
    `${(new Date()).getTime()}-${Math.floor(Math.random() * 100000)}`
);

export const pipe = (object, ...operations) => (
    operations.reduce((object, operation) => operation(object), object)
);

export const makeAction = (type) => {
    return ({ commit }, payload) => commit(type, payload);
};

export const makeActions = mutations => {
    return Object.keys(mutations).reduce((actions, type) => {
        return Object.defineProperty(actions, type, { value: makeAction(type) });
    }, {});
};<commit_msg>Update helpers.js<commit_after>export const matches = (element, selector) => {

    if (element.matches) {
        return element.matches(selector);
    }

    if (element.msMatchesSelector) {
        return element.msMatchesSelector(selector);
    }

    throw new Error('`Element.matches` is not supported in this browser');
};

export const uniqueIdentifier = () => (
    `${(new Date()).getTime()}-${Math.floor(Math.random() * 100000)}`
);

export const pipe = (object, ...operations) => (
    operations.reduce((object, operation) => operation(object), object)
);

export const makeAction = (type) => {
    return ({ commit }, payload) => commit(type, payload);
};

export const makeActions = mutations => {
    return Object.keys(mutations).reduce((actions, type) => {
        return Object.defineProperty(actions, type, { 
            value: makeAction(type),
            enumerable: true,
        });
    }, {});
};
{'fraction_non_alphanumeric': 0.16424581005586592, 'fraction_numerical': 0.0067039106145251395, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '6223353', 'n_tokens_mistral': 519, 'n_tokens_neox': 499, 'n_words': 119}