index.js
function settings (options) {
  var parsers
  var throws
  var name

  if (options && typeof options === 'function') {
    options = { yaml: options }
  }

  if (options && typeof options === 'object' && !Array.isArray(options)) {
    throws = options.throws || false
    name = options.name || null
    delete options.throws
    delete options.name
  }

  parsers = options
  options = {
    parsers: parsers,
    throws: throws,
    name: name
  }

  return options
}
function settings (options) {
  var parsers
  var throws
  var name

  if (options && typeof options === 'function') {
    options = { yaml: options }
  }

  if (options && typeof options === 'object' && !Array.isArray(options)) {
    throws = options.throws || false
    name = options.name || null
    delete options.throws
    delete options.name
  }

  parsers = options
  options = {
    parsers: parsers,
    throws: throws,
    name: name
  }

  return options
}
function settings ( options ) { var parsers var throws var name if ( options && typeof options === 'function' ) { options = { yaml : options } } if ( options && typeof options === 'object' && ! Array . isArray ( options ) ) { throws = options . throws || false name = options . name || null delete options . throws delete options . name } parsers = options options = { parsers : parsers , throws : throws , name : name } return options }
Formats options passed. If options is a function then assume its a yaml
parser. Any keys other than the known options, `name`, `throws` are
assumed to be a parser type and put in `parsers`

options - Object of options, or a function to parse frontmatter
options.throws - Boolean whether to throw when there's an error or not
options.name - The name to store parsed frontmatter as in
Formats options passed . If options is a function then assume its a yaml parser . Any keys other than the known options name throws are assumed to be a parser type and put in parsers