src/index.js
/**
   * Merge the additional configuration object into the existing configuration
   * @param {Object} add The additional configuration
   * @param {function} [parser] A function to parse the configuration properties after reading
   * @param {String} [location] Location of relative paths
   */
Merge the additional configuration object into the existing configuration
@param {Object} add The additional configuration
@param {function} [parser] A function to parse the configuration properties after reading
@param {String} [location] Location of relative paths
Merge the additional configuration object into the existing configuration @param { Object } add The additional configuration @param { function } [ parser ] A function to parse the configuration properties after reading @param { String } [ location ] Location of relative paths
merge(add, parser, location) {
    let dirLocation = "";
    if ( location !== undefined ) {
      dirLocation = path.dirname(location);
    }
    add = Config._parseConfig(add, dirLocation);
    if ( parser ) {
      add = parser(add);
    }
    let arrayMergeFunction = function (d, s) {
      return ( d !== undefined && s !== undefined ) ? d.concat(s) : s;
    };
    if ( this._replaceArrays ) {
      arrayMergeFunction = function(d, s) {
        return s;
      }
    }
    this._config = deepmerge(this._config, add, {
      arrayMerge: arrayMergeFunction
    });
  }
merge ( add , parser , location ) { let dirLocation = "" ; if ( location !== undefined ) { dirLocation = path . dirname ( location ) ; } add = Config . _parseConfig ( add , dirLocation ) ; if ( parser ) { add = parser ( add ) ; } let arrayMergeFunction = function ( d , s ) { return ( d !== undefined && s !== undefined ) ? d . concat ( s ) : s ; } ; if ( this . _replaceArrays ) { arrayMergeFunction = function ( d , s ) { return s ; } } this . _config = deepmerge ( this . _config , add , { arrayMerge : arrayMergeFunction } ) ; }
Merge the additional configuration object into the existing configuration
 @param {Object} add The additional configuration
 @param {function} [parser] A function to parse the configuration properties after reading
 @param {String} [location] Location of relative paths
Merge the additional configuration object into the existing configuration @param { Object } add The additional configuration @param { function } [ parser ] A function to parse the configuration properties after reading @param { String } [ location ] Location of relative paths
// Get directory of location, if provided // Parse relative paths relative to file location // Parse the new config, if parser is provided // Set Array Merge Function // Merge configs