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