lib/node-yaml.js
async function read(filename, options = undefined) {
  const {encoding, flag, ...opts} = normalizeOptions(options)

  if (!isNumber(filename)) {
    filename = await normalizePath(base, filename)

    opts.filename = filename
  }

  const content = await fs.readFile(filename, {encoding, flag})

  return yaml.load(content, opts)
}
async function read(filename, options = undefined) {
  const {encoding, flag, ...opts} = normalizeOptions(options)

  if (!isNumber(filename)) {
    filename = await normalizePath(base, filename)

    opts.filename = filename
  }

  const content = await fs.readFile(filename, {encoding, flag})

  return yaml.load(content, opts)
}
async function read ( filename , options = undefined ) { const { encoding , flag , ... opts } = normalizeOptions ( options ) if ( ! isNumber ( filename ) ) { filename = await normalizePath ( base , filename ) opts . filename = filename } const content = await fs . readFile ( filename , { encoding , flag } ) return yaml . load ( content , opts ) }
Read and parse YAML file from given path

@param {string | number} filename
@param {string | object} [options = undefined]

@param {string}

@return {Promise<object>}

@api public
Read and parse YAML file from given path