src/index.js
/**
   * Parse the Configuration.  This converts any values that are
   * relative paths to absolute paths (relative to the specified directory)
   * @param {Object} object The configuration object
   * @param {string} directory The relative path root directory
   * @returns {object} a parsed configuration object
   * @private
   */
Parse the Configuration.  This converts any values that are
relative paths to absolute paths (relative to the specified directory)
@param {Object} object The configuration object
@param {string} directory The relative path root directory
@returns {object} a parsed configuration object
@private
Parse the Configuration . This converts any values that are relative paths to absolute paths ( relative to the specified directory ) @param { Object } object The configuration object @param { string } directory The relative path root directory @returns { object } a parsed configuration object @private
static _parseConfig(object, directory) {
    let rtn = {};
    for (let property in object) {
      if (object.hasOwnProperty(property)) {
        let value = object[property];
        if ( Array.isArray(value) ) {
          let parsed = [];
          for ( let i = 0; i < value.length; i++ ) {
            let p = value[i];
            if ( typeof p === 'object' ) {
              p = Config._parseConfig(p, directory);
            }
            parsed.push(p);
          }
          rtn[property] = parsed;
        }
        else if ( typeof value === 'object' ) {
          rtn[property] = Config._parseConfig(value, directory);
        }
        else {
          rtn[property] = Config._parseConfigValue(value, directory);
        }
      }
    }
    return rtn;
  }
static _parseConfig ( object , directory ) { let rtn = { } ; for ( let property in object ) { if ( object . hasOwnProperty ( property ) ) { let value = object [ property ] ; if ( Array . isArray ( value ) ) { let parsed = [ ] ; for ( let i = 0 ; i < value . length ; i ++ ) { let p = value [ i ] ; if ( typeof p === 'object' ) { p = Config . _parseConfig ( p , directory ) ; } parsed . push ( p ) ; } rtn [ property ] = parsed ; } else if ( typeof value === 'object' ) { rtn [ property ] = Config . _parseConfig ( value , directory ) ; } else { rtn [ property ] = Config . _parseConfigValue ( value , directory ) ; } } } return rtn ; }
Parse the Configuration.
Parse the Configuration .
// Parse all of the properties in the object // If the property's value is an array, parse each child // If the property's value is an object, recurse another level // Parse the property's value