Skip to content

Commit

Permalink
chore: better use of destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
ilteoood committed Nov 13, 2024
1 parent 087cba1 commit 9a481fc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/verifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ function verifyToken(
// Verify the payload
const now = clockTimestamp || Date.now()

for (const validator of validators) {
const { type, claim, allowed, array, modifier, greater, errorCode, errorVerb } = validator
for (const { type, claim, allowed, array, modifier, greater, errorCode, errorVerb } of validators) {
const value = payload[claim]
const arrayValue = Array.isArray(value)
const values = arrayValue ? value : [value]
Expand Down

0 comments on commit 9a481fc

Please sign in to comment.