Create a new FlatToNested object.

@constructor
@param {object} config The configuration object.
506939
function FlatToNested(config) {
    this.config = config = config || {};
    this.config.id = config.id || 'id';
    this.config.parent = config.parent || 'parent';
    this.config.children = config.children || 'children';
    this.config.options = config.options || { deleteParent: true };
  }
505168
function Group(config) {
  if (!(this instanceof Group)) {
    return new Group(config);
  }

  Base.call(this, config);
  this.is('Group');
  this.use(utils.option());
  this.use(utils.plugin());
  this.init();
}
861681
function(newValue,property,config) {
                var thesetter = config.setter;
                if ( typeof(config.setter) === 'string' ) {
                    record[config.setter](newValue, property, config,record);
                } else {
                    //assume function
                    thesetter.call(record,newValue, property, config,record);
                }

            }
104962
static public function createObject($type, array $config = [])
	{
		if (is_string($type)) {
			return static::container()->get($type, $config);
		} elseif (is_array($type) && isset($type['class'])) {
			$class = $type['class'];
			unset($type['class']);
			if ($config) $type = array_merge($type, $config); 
			return static::container()->get($class, $type);
		} elseif (is_callable($type, false)) {
			return call_user_func($type, $config);
		} elseif (is_object($type)) {
			return $type;
		} elseif (is_array($type)) {
			throw new InvalidConfigException('object configuration must be an array containing a "class" element.');
		} else {
			throw new InvalidConfigException("Unsupported configuration type: " . gettype($type));
		}
	}
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 };
}
308114
function _createConfig(){
        let file = repositoryPath + '/config.json';
        let config = {
            simulation: false
        };
        return new Promise(function(resolve, reject) {
            jsonfile.writeFile(file, config, function (err) {
                if(err){
                    reject(err);
                    return;
                }
                resolve();
            });

        });
    }
1349522
function (config) {
                if (typeof config !== 'object') {
                    throw new Error('You must provide a valid configuration object to the config setter.');
                }
                // combine config with default
                var mergedConfig = Object.assign({}, config);
                // add config to map
                this._config = new Map(Object.entries(mergedConfig));
            }
340560
function setConfigObject (config, prev) {
    Object.keys(config).forEach(function (key) {
      var value = config[key]
      var fullKey = prev ? prev + '.' + key : key

      // if the value is an inner object and we have dot-notation
      // enabled, treat inner objects in config the same as
      // heavily nested dot notations (foo.bar.apple).
      if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) {
        // if the value is an object but not an array, check nested object
        setConfigObject(value, fullKey)
      } else {
        // setting arguments via CLI takes precedence over
        // values within the config file.
        if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey]) || (flags.arrays[fullKey] && configuration['combine-arrays'])) {
          setArg(fullKey, value)
        }
      }
    })
  }
1107816
function init(opt_config) {
  if (modalInstance) {
    return;
  }
  var config = objects.clone(defaultConfig);
  if (opt_config) {
    objects.merge(config, opt_config);
  }

  modalInstance = new Modal(config);
}
219779
function (config) {
    config = config || {};
    Appender.call(this, config);

    /**
     * True to log strings instead of objects
     */
    this.appendStrings = (typeof config.appendStrings !== 'undefined') ?
      config.appendStrings :
      true;

    /**
     * Socket server connection point
     */
    this.url = config.url || 'http://localhost';

    /**
     * Socket handle when connection is established
     */
    this.socket = null;
  }
1170449
function Config(config) {
        config = config || {};
        // config default values
        this.config = {};

        corbel.utils.extend(this.config, config);
    }
969844
function prepareConfig(config) {

		config.globals = config.globals || config.global || {};
		delete config.global;

		var copiedRules = {},
			parserOptions = {},
			preparedConfig;

		if (typeof config.rules === "object") {
			Object.keys(config.rules).forEach(function(k) {
				var rule = config.rules[k];

				if (rule === null) {
					throw new Error("Invalid config for rule '" + k + "'\.");
				}
				if (Array.isArray(rule)) {
					copiedRules[k] = rule.slice();
				} else {
					copiedRules[k] = rule;
				}
			});
		}

		// merge in environment parserOptions
		if (typeof config.env === "object") {
			Object.keys(config.env).forEach(function(envName) {
				var env = Environments.get(envName);

				if (config.env[envName] && env && env.parserOptions) {
					parserOptions = ConfigOps.merge(parserOptions, env.parserOptions);
				}
			});
		}

		preparedConfig = {
			rules: copiedRules,
			parser: config.parser || DEFAULT_PARSER,

			globals: ConfigOps.merge({}, config.globals),
			env: ConfigOps.merge({}, config.env || {}),
			settings: ConfigOps.merge({}, config.settings || {}),
			parserOptions: ConfigOps.merge(parserOptions, config.parserOptions || {}),
			tern: config.tern // ORION
		};

		if (preparedConfig.parserOptions.sourceType === "module") {
			if (!preparedConfig.parserOptions.ecmaFeatures) {
				preparedConfig.parserOptions.ecmaFeatures = {};
			}

			// can't have global return inside of modules
			preparedConfig.parserOptions.ecmaFeatures.globalReturn = false;

			// also need at least ES6 for modules
			if (!preparedConfig.parserOptions.ecmaVersion || preparedConfig.parserOptions.ecmaVersion < 6) {
				preparedConfig.parserOptions.ecmaVersion = 6;
			}
		}

		return preparedConfig;
	}
1146266
function createMap(mapConfig) {
      app.debug('MapActions >>> createMap');
      var basemap = (0, _jsUtilsParams.getUrlParams)(location.href)[_jsConstantsAppConstants.MAP.basemap];
      if (basemap) {
        mapConfig.options.basemap = basemap;
      }
      var deferred = new Promise(function (resolve) {
        app.map = new _EsriMap['default'](mapConfig.id, mapConfig.options);
        app.map.on('load', function () {
          resolve();
        });
      });

      return deferred;
    }
182952
def new_plugin(self, config, *args, **kwargs):
        
        typ = None
        obj = None

        # if type is defined, create a new instance
        if 'type' in config:
            typ = config['type']

        # single key is overriding an existing plugin instance
        elif isinstance(config, collections.Mapping) and len(config) == 1:
            # get type name and shift out config to parent level
            (typ, config) = list(config.items())[0]

        obj = self._ctor(typ, config, *args, **kwargs)

        # store if named
        if 'name' in config:
            self._instance[config['name']] = obj
        else:
            # this could dupe on .name, make name=''?
            config['name'] = typ

        return obj
4294
function config(name, options) {
    if (isObject(name)) {
      extend(global, name);
      return;
    }
    var previous = (registry[name] && registry[name].$config) ? registry[name].$config() : null,
        base = extend({}, previous ? extend({}, previous) : extend({}, DEFAULTS, DEFAULT_METHODS));

    options = deepExtend(copy(base), options);

    if (!options.url) {
      options.url = global.base.replace(/\/$/, '') + '/' + hyphenate(name);
    }
    registry[name] = new ModelClass(options);
  }
606584
function initConfig(obj) {
  Object.keys(obj).forEach(item => {
    if (!process.env[item]) {
      process.env[item] = obj[item];
    }
  });
}
192450
function buildConfig (_config) {
  _config.datastore = Object.assign({}, defaultDatastore, _get(_config, 'datastore', {}))

  return _config
}