}}}
 Config: store loader and load config {{{
513261
def init_config(loader)
      case loader
      when String, Hash, nil
        @config_loader = ConfigLoaders::FileOrHashLoader.new(loader)
      else
        @config_loader = loader
      end
      load_config
    end
1100279
function loadComponentFile (meta, key, filepath, messages) {
  const ext = path.extname(filepath).slice(1)
  const loader = fileLoaders[ext] || fileLoaders.DEFAULT

  return loader(meta, key, filepath, messages)
}
200784
def map_constructor(self, loader,  node, deep=False):
        
        mapping = {}
        for key_node, value_node in node.value:
            key = loader.construct_object(key_node, deep=deep)
            value = loader.construct_object(value_node, deep=deep)
            if key in mapping:
                raise ValueError(f"Duplicate key: \"{key}\"")
            mapping[key] = value

        return mapping
1236428
function CacheHandler(config) {
  var self = this;
  config = config || {};
  var options = config.cacheOptions || {};
  options.store = getCacheCtor(options.store);

  self.cacheManager = config.cacheManager || new CacheManager();
  CACHE_REGIONS.map(function(region) {
    self.cacheManager.createCache(region,options);
  });

}
324227
function loadExampleConfig(exampleFolder) {
  // Default config.
  let config = {build: 'build', run: 'serve:e2e'};

  try {
    const exampleConfig = fs.readJsonSync(`${exampleFolder}/${EXAMPLE_CONFIG_FILENAME}`);
    Object.assign(config, exampleConfig);
  } catch (e) {
  }

  return config;
}
386032
function load() {
		Object.keys(envs).forEach(function(envName) {
			environments[envName] = envs[envName];
		});
	}
430858
def store_config(filepath, hash, options = {})
      content  = "# " + File.basename(filepath) + "\n"
      content += "# /!\\ DO NOT EDIT THIS FILE: it has been automatically generated\n"
      if options[:header]
        options[:header].split("\n").each { |line| content += "# #{line}" }
      end
      content += hash.to_yaml
      show_diff_and_write(content, filepath, options)
      # File.open( filepath, 'w') do |f|
      #     f.print "# ", File.basename(filepath), "\n"
      #     f.puts "# /!\\ DO NOT EDIT THIS FILE: it has been automatically generated"
      #     if options[:header]
      #         options[:header].split("\n").each do |line|
      #             f.puts "# #{line}"
      #         end
      #     end
      #     f.puts hash.to_yaml
      # end
    end
784052
def _load(self):
        """"""
        for attr_name, config_prop in self._iter_config_props():
            found = False
            for loader in self._loaders:
                if loader.exists(config_prop.property_key):
                    raw_value = loader.get(config_prop.property_key)
                    converted_value = config_prop.load(raw_value)

                    self._set_instance_prop(attr_name, config_prop, converted_value)
                    found = True
                    break

            if not found:
                if not config_prop.required or config_prop.default is not None:
                    self._set_instance_prop(attr_name, config_prop, config_prop.default)
                else:
                    raise ValueError('Missing required ConfigProperty {}'.format(attr_name))
1363882
function loadConfigAndGenerateSite(useServer, port) {
  var config = loadConfig();
  if (port) config.port = port;
  generateSite(config, useServer);
}
179238
function loadConfig(config, props) {
  // The calling module's path. Unfortunately, because modules are cached,
  // module.parent is the FIRST calling module parent, not necessarily the
  // current one.
  var callerPath = path.dirname(stackTrace.get(loadConfig)[1].getFileName());

  // If no config defined, resolve to nearest package.json to the calling lib. If not found, throw an error.
  if (config == null) {
    config = findup('package.json', {cwd: callerPath});
    if (config == null) {
      throw new Error('No package.json found.');
    }
  }
  // If filename was specified with no path parts, make the path absolute so
  // that resolve doesn't look in node_module directories for it.
  else if (typeof config === 'string' && !/[\\\/]/.test(config)) {
    config = path.join(callerPath, config);
  }

  // If package is a string, try to require it.
  if (typeof config === 'string') {
    config = require(resolve(config, {basedir: callerPath}));
  }

  // If config is not an object yet, something is amiss.
  if (typeof config !== 'object') {
    throw new Error('Invalid configuration specified.');
  }

  // For all specified props, populate result object.
  var result = {};
  props.forEach(function(prop) {
    result[prop] = config[prop] ? Object.keys(config[prop]) : [];
  });
  return result;
}
677328
function collectionLoader(collection, config) {
  collection._addView = collection.addView.bind(collection);
  var fn = collection.view;

  collection.define('view', function() {
    var view = fn.apply(this, arguments);
    utils.contents.sync(view);
    return view;
  });

  /**
   * Patches the `.addViews` method to support glob patterns.
   *
   * @param {Object|String} `key` View name or object.
   * @param {Object} `value` View options, when key is a string.
   * @return {Object}
   */

  collection.define('addView', function(key, value) {
    return this._addView.apply(this, arguments);
  });

  /**
   * Patches the `.addViews` method to support glob patterns.
   *
   * @param {Object|String} `key` View name or object.
   * @param {Object} `value` View options, when key is a string.
   * @return {Object}
   */

  collection.define('addViews', function(key, value) {
    this.load.apply(this, arguments);
    return this;
  });

  collection.define('loadView', function(filepath, options) {
    this.load.apply(this, arguments);
    return this;
  });

  collection.define('loadViews', function(patterns, options) {
    this.load.apply(this, arguments);
    return this;
  });

  collection.define('load', function() {
    return load('_addView', config).apply(this, arguments);
  });
}
236061
function loadConfig(config) {
  var options = normalizeOptions(config);

  if (config.options.plugins != null && !Array.isArray(config.options.plugins)) {
    throw new Error(".plugins should be an array, null, or undefined");
  }

  var plugins = (config.options.plugins || []).map(function (plugin, index) {
    var _normalizePair = normalizePair(plugin, _files.loadPlugin, config.dirname),
        filepath = _normalizePair.filepath,
        value = _normalizePair.value,
        options = _normalizePair.options;

    return {
      alias: filepath || config.loc + "$" + index,
      loc: filepath || config.loc,
      value: value,
      options: options,
      dirname: config.dirname
    };
  });

  if (config.options.presets != null && !Array.isArray(config.options.presets)) {
    throw new Error(".presets should be an array, null, or undefined");
  }

  var presets = (config.options.presets || []).map(function (preset, index) {
    var _normalizePair2 = normalizePair(preset, _files.loadPreset, config.dirname),
        filepath = _normalizePair2.filepath,
        value = _normalizePair2.value,
        options = _normalizePair2.options;

    return {
      alias: filepath || config.loc + "$" + index,
      loc: filepath || config.loc,
      value: value,
      options: options,
      dirname: config.dirname
    };
  });

  return { options: options, plugins: plugins, presets: presets };
}
605603
function loadFromConfig(router, providers, sessionStore) {
  const sitesMap = siteService.sites(),
    siteHosts = _.uniq(_.map(sitesMap, 'host'));

  // iterate through the hosts
  _.each(siteHosts, hostname => {
    const sites = _.filter(sitesMap, {host: hostname}).sort(sortByDepthOfPath);

    addHost({
      router,
      hostname,
      sites,
      providers,
      sessionStore
    });
  });

  return router;
}
1032428
function (config) {
            if (isUrlOnWhitelist(config.url)) {
              numLoadings++;
              $rootScope.$emit('loaderShow', config.method);
            }

            return config || $q.when(config);
          }
512887
function loadConfiguration() {
    let configuration;

    if (isInit()) {
        configuration = jsonReader('./.versionFilesList.json');

        // check configuration file's integrity
        if (!configuration.name || !configuration.currentVersion || !configuration.filesList || !configuration.versionPrefix) {
            sendError('E002');
        }

        // check .versionFilesList.json for missing informations
        if (configuration.name.length === 0 || configuration.currentVersion.length === 0) {
            sendError('E001');
        }
    }
    return configuration;
}
748130
function Config(options) {
  var useConfig;

  options = options || {};

  this.cache = {};
  this.parser = options.parser;

  this.useNplintrc = (options.useNplintrc !== false);
  this.useNplintignore = (options.useNplintignore !== false);

  useConfig = options.configFile;
  this.options = options;

  if (useConfig) {
    if (isResolvable(useConfig) || isResolvable('nplint-config-' + useConfig) || useConfig.charAt(0) === '@') {
      this.useSpecificConfig = loadConfig(useConfig);
    } else {
      this.useSpecificConfig = loadConfig(path.resolve(process.cwd(), useConfig));
    }
  }
}
746090
def save_load(jid, clear_load, minions=None):
    '''
    
    '''
    for returner_ in __opts__[CONFIG_KEY]:
        _mminion().returners['{0}.save_load'.format(returner_)](jid, clear_load)