code: function konfig(name, opts = {}) {
    const { useCache = true } = opts;
    const basename = name || 'app';
    const env = opts.env || process.env.NODE_ENV || 'development';
    const dir = opts.path || process.env.NODE_CONFIG_DIR || 'config'
  
    const cfgKey = basename + '/' + env;
    if (useCache && cfgKey in configCache) {
      return configCache[cfgKey];
    }
  
    const cfg = loadConfigFile(basename, path.resolve(process.cwd(), dir));
    const cfgForEnv = mergeConfig(cfg[env], cfg['default']);
  
    if (!cfgForEnv) {
      throw new Error('The configuration for ' + env + ' is not defined in ' + basename);
    }
  
    configCache[cfgKey] = cfgForEnv;
    return cfgForEnv;
  }
docs: memory cache