source: trip-planner-front/node_modules/semver/internal/parse-options.js@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 401 bytes
Line 
1// parse out just the options we care about so we always get a consistent
2// obj with keys in a consistent order.
3const opts = ['includePrerelease', 'loose', 'rtl']
4const parseOptions = options =>
5 !options ? {}
6 : typeof options !== 'object' ? { loose: true }
7 : opts.filter(k => options[k]).reduce((options, k) => {
8 options[k] = true
9 return options
10 }, {})
11module.exports = parseOptions
Note: See TracBrowser for help on using the repository browser.