We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6853ed2 commit eaeaeb0Copy full SHA for eaeaeb0
1 file changed
src/lib/isJWT.js
@@ -3,9 +3,11 @@ import isBase64 from './isBase64';
3
4
function decodeBase64Url(b64) {
5
if (typeof Buffer !== 'undefined') {
6
+ /* istanbul ignore else */
7
if (typeof Buffer.from === 'function') {
8
return Buffer.from(b64, 'base64').toString('utf8');
9
}
10
+ /* istanbul ignore next */
11
// eslint-disable-next-line no-buffer-constructor
12
return new Buffer(b64, 'base64').toString('utf8');
13
0 commit comments