code: function parseYaml(filePath) {
      let config;
  
      try {
          config = yaml.safeLoad(fs.readFileSync(filePath, 'utf8'));
      } catch (e) {
          console.log(e);
      }
  
      return config;
  }
docs: https://github.com/nodeca/js-yaml#api Get document, or throw exception on error