src/index.js
/**
   * Read the configuration file from the specified path and merge its properties
   * with the existing configuration properties
   * @param {string} location Path to the configuration file to read
   * @param {function} [parser] A function to parse the configuration properties after reading
   */
Read the configuration file from the specified path and merge its properties
with the existing configuration properties
@param {string} location Path to the configuration file to read
@param {function} [parser] A function to parse the configuration properties after reading
Read the configuration file from the specified path and merge its properties with the existing configuration properties @param { string } location Path to the configuration file to read @param { function } [ parser ] A function to parse the configuration properties after reading
read(location, parser) {
    if ( location ) {
      if ( Config._isRelativePath(location) ) {
        location = path.normalize(process.cwd() + '/' + location);
      }
      if ( !fs.existsSync(location) ) {
        throw new Error('Config file at ' + location + ' does not exist');
      }
      let add = JSON.parse(fs.readFileSync(location, 'utf8'));
      this.merge(add, parser, location);
    }
  }
read ( location , parser ) { if ( location ) { if ( Config . _isRelativePath ( location ) ) { location = path . normalize ( process . cwd ( ) + '/' + location ) ; } if ( ! fs . existsSync ( location ) ) { throw new Error ( 'Config file at ' + location + ' does not exist' ) ; } let add = JSON . parse ( fs . readFileSync ( location , 'utf8' ) ) ; this . merge ( add , parser , location ) ; } }
Read the configuration file from the specified path and merge its properties
 with the existing configuration properties
 @param {string} location Path to the configuration file to read
 @param {function} [parser] A function to parse the configuration properties after reading
Read the configuration file from the specified path and merge its properties with the existing configuration properties @param { string } location Path to the configuration file to read @param { function } [ parser ] A function to parse the configuration properties after reading
// Relative Path: relative to process cwd // Check for file existence // Read new config file // Merge the new config file to the existing config