<commit_before>var _ = require('lodash');

function customizer(objValue, srcValue) {
    // Ensure dates and arrays are not recursively merged
    if (!_.isObject(objValue)) {
        return objValue;
    }

    return mergeDefaults(objValue, srcValue);
}

var mergeDefaults = _.partialRight(_.mergeWith, customizer);

module.exports = mergeDefaults;<commit_msg>Use Immutable instead of lodash for mergeDefaults<commit_after>var Immutable = require('immutable');

/**
 * Merge
 * @param  {Object|Map} obj
 * @param  {Object|Map} src
 * @return {Object}
 */
function mergeDefaults(obj, src) {
    var objValue = Immutable.fromJS(obj);
    var srcValue = Immutable.fromJS(src);

    return srcValue.mergeDeep(objValue).toJS();
}

module.exports = mergeDefaults;
{'fraction_non_alphanumeric': 0.1225296442687747, 'fraction_numerical': 0.0, 'mean_word_length': 4.428571428571429, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6481037', 'n_tokens_mistral': 240, 'n_tokens_neox': 231, 'n_words': 56}