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

var readTOML = require('./utils').readTOML;
var fileExists = require('./utils').fileExists;

var defaults = {
  account: {
    username: 'admin',
    password: 'password',
    channel: '#riotgames'
  },
  irc: {
    address: '172.16.31.10'
  },
  server: {
    port: 6667
  }
};

function Config(options) {
  this['account'] = _.defaults(defaults['account'], options['account']);
  this['irc'] = _.defaults(defaults['irc'], options['irc']);
  this['server'] = _.defaults(defaults['server'], options['server']);
}

Config.fromFile = function(path, callback) {
  async.waterfall([
    function(cb) {
      fileExists(path, function(exists) {
        if (exists) {<commit_msg>Fix incorrect use of `_.defaults`<commit_after>var async = require('async');
var _ = require('lodash');

var readTOML = require('./utils').readTOML;
var fileExists = require('./utils').fileExists;

var defaults = {
  account: {
    username: 'admin',
    password: 'password',
    channel: '#riotgames'
  },
  irc: {
    address: '172.16.31.10'
  },
  server: {
    port: 6667
  }
};

function Config(options) {
  this['account'] = _.defaults(options['account'], defaults['account']);
  this['irc'] = _.defaults(options['irc'], defaults['irc']);
  this['server'] = _.defaults(options['server'], defaults['server']);
}

Config.fromFile = function(path, callback) {
  async.waterfall([
    function(cb) {
      fileExists(path, function(exists) {
        if (exists) {
{'fraction_non_alphanumeric': 0.19378306878306878, 'fraction_numerical': 0.017195767195767195, 'mean_word_length': 4.111486486486487, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2712352', 'n_tokens_mistral': 508, 'n_tokens_neox': 481, 'n_words': 96}