84a4501ccaa4f1e5d4206ab3214bb2038fcf6e59c163e71d7c1fba84c9098ae8f108c9a0e1794ed4e34dd38adaeb49a1318a438b51d415d35a0b3a4b2a441f 338 B

1234567891011121314151617
  1. 'use strict'
  2. // parse out just the options we care about
  3. const looseOption = Object.freeze({ loose: true })
  4. const emptyOpts = Object.freeze({ })
  5. const parseOptions = options => {
  6. if (!options) {
  7. return emptyOpts
  8. }
  9. if (typeof options !== 'object') {
  10. return looseOption
  11. }
  12. return options
  13. }
  14. module.exports = parseOptions