<commit_before>function deepCloneArray(array) {
    return _.map(array, value => {
        if (_.isArray(value)) {
            return deepCloneArray(array);
        } else if (_.isFunction(value)) {
            return value;
        } else if (_.isObject(value)) {
            return deepClone(value);
        }

        return value;
    })
}

export default function deepClone(object) {
    let clone = {};

    _.each(object, (value, key) => {
        if (_.isArray(value)) {
            clone[key] = deepCloneArray(value);
        } else if (_.isFunction(value)) {
            clone[key] = value;
        } else if (_.isRegExp(value)) {
            clone[key] = value;
        } else if (_.isDate(value)) {<commit_msg>Fixed #127 - deepCloneArray infinite recursion<commit_after>function deepCloneArray(array) {
    return _.map(array, value => {
        if (_.isArray(value)) {
            return deepCloneArray(value);
        } else if (_.isFunction(value)) {
            return value;
        } else if (_.isObject(value)) {
            return deepClone(value);
        }

        return value;
    })
}

export default function deepClone(object) {
    let clone = {};

    _.each(object, (value, key) => {
        if (_.isArray(value)) {
            clone[key] = deepCloneArray(value);
        } else if (_.isFunction(value)) {
            clone[key] = value;
        } else if (_.isRegExp(value)) {
            clone[key] = value;
        } else if (_.isDate(value)) {
{'fraction_non_alphanumeric': 0.13811780636425186, 'fraction_numerical': 0.002031144211238998, 'mean_word_length': 1.9858585858585858, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7190174', 'n_tokens_mistral': 436, 'n_tokens_neox': 443, 'n_words': 98}