add ability to call self-signed or invalid certificate clients

This commit is contained in:
Joel Male
2021-02-26 13:58:33 +10:00
parent 528d756289
commit 9380ee26ff
3852 changed files with 253796 additions and 137756 deletions
+11
View File
@@ -0,0 +1,11 @@
// 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