<commit_before>'use strict';

var _ = require('lodash');
var Sequelize = require('sequelize');

module.exports = function(dbConfig) {
    if (dbConfig.url && _.isString(dbConfig.url)) {
        return new Sequelize(dbConfig.url);
    }

    return new Sequelize(dbConfig.database, dbConfig.user, dbConfig.password,
        dbConfig.options);
};
<commit_msg>refactor(database): save new db into variable<commit_after>'use strict';

var _ = require('lodash');
var Sequelize = require('sequelize');

module.exports = function(dbConfig) {
    var newDB;

    if (dbConfig.url && _.isString(dbConfig.url)) {
        newDB = new Sequelize(dbConfig.url);
    }
    else {
        newDB = new Sequelize(dbConfig.database, dbConfig.user,
            dbConfig.password, dbConfig.options);
    }

    return newDB;
};

{'fraction_non_alphanumeric': 0.13506815365551425, 'fraction_numerical': 0.0, 'mean_word_length': 3.488888888888889, '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': '3462451', 'n_tokens_mistral': 264, 'n_tokens_neox': 258, 'n_words': 52}