chore: migrate code to ESM (#73)

This commit is contained in:
Luca Casonato
2024-09-13 17:15:41 +02:00
committed by GitHub
parent f8480e68ca
commit f1ac2c87b8
905 changed files with 69790 additions and 56120 deletions

View File

@@ -1,11 +0,0 @@
// 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