src/config.js
async function loadConfigFile(filePath) {
  const f = await Promise.any(
    _.map(['.yml', '.yaml', '.json', ''], async(ext) =>
      await utils.fileExists(`${filePath}${ext}`)));
  if (f) {
    return loadYaml(await fs.readFileAsync(f));
  }
  return undefined;
}
async function loadConfigFile(filePath) {
  const f = await Promise.any(
    _.map(['.yml', '.yaml', '.json', ''], async(ext) =>
      await utils.fileExists(`${filePath}${ext}`)));
  if (f) {
    return loadYaml(await fs.readFileAsync(f));
  }
  return undefined;
}
async function loadConfigFile ( filePath ) { const f = await Promise . any ( _ . map ( [ '.yml' , '.yaml' , '.json' , '' ] , async ( ext ) => await utils . fileExists ( ` ${ filePath } ${ ext } ` ) ) ) ; if ( f ) { return loadYaml ( await fs . readFileAsync ( f ) ) ; } return undefined ; }
if file exists, load it, else return undefined. Iterate through various possible file extensions in attempt to find file.
if file exists load it else return undefined . Iterate through various possible file extensions in attempt to find file .