From ea648c9fee3f0606f7ce159cd114a5566c4bfab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 6 Feb 2023 18:58:55 +0200 Subject: [PATCH] Cleanup: Remove unsupported opts.encoding to JSON.parse > reviver Optional > > If a function, this prescribes how each value originally produced by > parsing is transformed before being returned. Non-callable values are > ignored. The function is called with the following arguments: - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse --- lib/verify-stream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/verify-stream.js b/lib/verify-stream.js index 39f7c73..984cd7c 100644 --- a/lib/verify-stream.js +++ b/lib/verify-stream.js @@ -68,7 +68,7 @@ function jwsDecode(jwsSig, opts) { var payload = payloadFromJWS(jwsSig); if (header.typ === 'JWT' || opts.json) - payload = JSON.parse(payload, opts.encoding); + payload = JSON.parse(payload); return { header: header,