Skip to content

Commit eaeaeb0

Browse files
chore(isJWT): add istanbul ignore for old Node Buffer fallback
1 parent 6853ed2 commit eaeaeb0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/lib/isJWT.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ import isBase64 from './isBase64';
33

44
function decodeBase64Url(b64) {
55
if (typeof Buffer !== 'undefined') {
6+
/* istanbul ignore else */
67
if (typeof Buffer.from === 'function') {
78
return Buffer.from(b64, 'base64').toString('utf8');
89
}
10+
/* istanbul ignore next */
911
// eslint-disable-next-line no-buffer-constructor
1012
return new Buffer(b64, 'base64').toString('utf8');
1113
}

0 commit comments

Comments
 (0)