lib/util/yaml.js
function yamlParse (text, reviver) {
    try {
      return yaml.safeLoad(text);
    }
    catch (e) {
      if (e instanceof Error) {
        throw e;
      }
      else {
        // https://github.com/nodeca/js-yaml/issues/153
        throw ono(e, e.message);
      }
    }
  }
function yamlParse (text, reviver) {
    try {
      return yaml.safeLoad(text);
    }
    catch (e) {
      if (e instanceof Error) {
        throw e;
      }
      else {
        // https://github.com/nodeca/js-yaml/issues/153
        throw ono(e, e.message);
      }
    }
  }
function yamlParse ( text , reviver ) { try { return yaml . safeLoad ( text ) ; } catch ( e ) { if ( e instanceof Error ) { throw e ; } else { // https://github.com/nodeca/js-yaml/issues/153 throw ono ( e , e . message ) ; } } }
Parses a YAML string and returns the value.

@param {string} text - The YAML string to be parsed
@param {function} [reviver] - Not currently supported. Provided for consistency with {@link JSON.parse}
@returns {*}
Parses a YAML string and returns the value .