11cb0ef41Sopenharmony_ci// parse out just the options we care about 21cb0ef41Sopenharmony_ciconst looseOption = Object.freeze({ loose: true }) 31cb0ef41Sopenharmony_ciconst emptyOpts = Object.freeze({ }) 41cb0ef41Sopenharmony_ciconst parseOptions = options => { 51cb0ef41Sopenharmony_ci if (!options) { 61cb0ef41Sopenharmony_ci return emptyOpts 71cb0ef41Sopenharmony_ci } 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci if (typeof options !== 'object') { 101cb0ef41Sopenharmony_ci return looseOption 111cb0ef41Sopenharmony_ci } 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ci return options 141cb0ef41Sopenharmony_ci} 151cb0ef41Sopenharmony_cimodule.exports = parseOptions 16