frontend/.pnpm-store/v3/files/f3/e903ef760d989412fdf574142a0491d3ef68c4ad843d309dea6cda4ed4cb3491a09b02d00ae0b17b231444b40701b3cbad29ea1dda0bc730c4b06857e93804

12 lines
401 B
Plaintext

// parse out just the options we care about so we always get a consistent
// obj with keys in a consistent order.
const opts = ['includePrerelease', 'loose', 'rtl']
const parseOptions = options =>
!options ? {}
: typeof options !== 'object' ? { loose: true }
: opts.filter(k => options[k]).reduce((options, k) => {
options[k] = true
return options
}, {})
module.exports = parseOptions