Skip to content

Commit

Permalink
mergeDeepRight to get new options
Browse files Browse the repository at this point in the history
  • Loading branch information
cdwills committed Feb 14, 2019
1 parent 193e74d commit cb5976e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -73,3 +73,5 @@ const factory = options => {
}

module.exports = factory

module.exports = factory

0 comments on commit cb5976e

Please sign in to comment.