File "parse-options.js"

Full Path: C:/wamp64/www/Seleccion/node_modules/http-errors/parse-options.js
File size: 338 bytes
MIME-type: text/plain
Charset: utf-8

'use strict'

// parse out just the options we care about
const looseOption = Object.freeze({ loose: true })
const emptyOpts = Object.freeze({ })
const parseOptions = options => {
  if (!options) {
    return emptyOpts
  }

  if (typeof options !== 'object') {
    return looseOption
  }

  return options
}
module.exports = parseOptions