Files
node-jsonwebtoken/test/test-utils.js
T
Tim OramandEduardo Diaz 48edd0e3f7 Refactor tests related to expiresIn and exp (#501)
This change extracts all tests in the current test files related
to expiresIn and exp into a single test file. It also adds several
missing tests.
2018-07-06 23:40:49 +02:00

14 lines
214 B
JavaScript

'use strict';
function base64UrlEncode(str) {
return Buffer.from(str).toString('base64')
.replace(/\=/g, "")
.replace(/\+/g, "-")
.replace(/\//g, "_")
;
}
module.exports = {
base64UrlEncode,
};