From cb5976e487d8c2f7312d98cb80cc5c3da0784f52 Mon Sep 17 00:00:00 2001 From: Craig Wills <2634+cdwills@users.noreply.github.com> Date: Thu, 14 Feb 2019 10:57:32 -0600 Subject: [PATCH] mergeDeepRight to get new options --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9a641ab..b1227d4 100644 --- a/index.js +++ b/index.js @@ -5,7 +5,7 @@ const jwt = require('jsonwebtoken') const { applyTo: thrush, compose, composeP, curryN, omit, merge, - partialRight, prop, replace + mergeDeepRight, partialRight, prop, replace } = require('ramda') const { promisify, rename, tapP } = require('@articulate/funky') @@ -40,7 +40,7 @@ const jwksOptsDefaults = { jwks: { cache: true, rateLimit: true } } const factory = options => { const clients = {} - const opts = merge(options, jwksOptsDefaults) + const opts = mergeDeepRight(jwksOptsDefaults, options) const verifyOpts = omit([ 'issWhitelist', 'jwks' ], opts) const jwksOpts = prop('jwks', opts) @@ -73,3 +73,5 @@ const factory = options => { } module.exports = factory + +module.exports = factory