Files
setup-helm/node_modules/jest-snapshot/node_modules/semver/internal/parse-options.js
github-actions[bot] e4f3964f67 v3 new release (#84)
swap to graphql
2022-07-11 13:48:02 -04:00

12 lines
383 B
JavaScript

// 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