Urara-Blog/node_modules/.pnpm-store/v3/files/db/2f7b8d7394d393585a580fae4e4f4c98b481cb2d4891b0e61132823d82cd1697979d7c4f52e824f4f58a822f97816cba15b57a757228051113fd03666f48b4
2022-08-14 01:14:53 +08:00

11 lines
383 B
Text

// 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((o, k) => {
o[k] = true
return o
}, {})
module.exports = parseOptions