Some small cleanups and fixes

This commit is contained in:
the-djmaze 2022-02-24 12:43:44 +01:00
parent e7c7b8ed53
commit 962ddde1f3
9 changed files with 34 additions and 39 deletions

View file

@ -44,7 +44,7 @@ export const
/* // Without deprecated 'unescape':
b64EncodeJSON = data => btoa(encodeURIComponent(JSON.stringify(data)).replace(
/%([0-9A-F]{2})/g, (match, p1) => String.fromCharCode('0x' + p1)
)),
)),
*/
b64EncodeJSONSafe = data => b64EncodeJSON(data).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''),