47ab342470da97b586dec713a56f0961ad8d6dbe87eb524675d48c19cbb6dfaf9635dc7291eacd5c2e3d3a38108736d95905fec0c0e1f7718172978b0a1638 324 B

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