<commit_before>const ld = require('lodash');
const users = require('ms-users-restify');

/**
 * Default configuration object
 * @type {Object}
 */
const config = module.exports = {
  users: {},
  payments: {
    prefix: 'payments',
    postfix: {
      'planCreate': 'plan.create',
      'planUpdate': 'plan.update',
      'planList': 'plan.list',
      'planDelete': 'plan.delete',
      'planState': 'plan.state',
      'agreementCreate': 'agreement.create',
      'agreementExecute': 'agreement.execute',
    },
    timeouts: {},
  },
};

/**
 * Returns configuration instance
 * @return {Object}
 */
module.exports = exports = config;

/**
 * Reconfigures instance
 */
exports.reconfigure = function reconfigure(opts) {
  ld.merge(config, opts);
  users.reconfigure(config);
};

/**
 * returns timeout for a route
 */
exports.getTimeout = function getTimeout(route) {
  return config.files.timeouts[route] || 5000;
};

/**
 * Returns text route
 */
exports.getRoute = function getRoute(route) {
  const files = config.files;
  return [files.prefix, files.postfix[route]].join('.');
};<commit_msg>Fix config<commit_after>const ld = require('lodash');
const users = require('ms-users-restify');

/**
 * Default configuration object
 * @type {Object}
 */
const config = module.exports = {
  users: {},
  payments: {
    prefix: 'payments',
    postfix: {
      'planCreate': 'plan.create',
      'planUpdate': 'plan.update',
      'planList': 'plan.list',
      'planDelete': 'plan.delete',
      'planState': 'plan.state',
      'agreementCreate': 'agreement.create',
      'agreementExecute': 'agreement.execute',
    },
    timeouts: {},
  },
};

/**
 * Returns configuration instance
 * @return {Object}
 */
module.exports = exports = config;

/**
 * Reconfigures instance
 */
exports.reconfigure = function reconfigure(opts) {
  ld.merge(config, opts);
  users.reconfigure(config);
};

/**
 * returns timeout for a route
 */
exports.getTimeout = function getTimeout(route) {
  return config.payments.timeouts[route] || 5000;
};

/**
 * Returns text route
 */
exports.getRoute = function getRoute(route) {
  const payments = config.payments;
  return [payments.prefix, payments.postfix[route]].join('.');
};
{'fraction_non_alphanumeric': 0.16998191681735986, 'fraction_numerical': 0.003616636528028933, 'mean_word_length': 3.6297071129707112, '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': '3339089', 'n_tokens_mistral': 699, 'n_tokens_neox': 680, 'n_words': 147}