mirror of
https://github.com/h44z/wg-portal.git
synced 2026-02-25 03:46:23 +00:00
Signed-off-by: Arnaud Rocher <arnaud.roche3@gmail.com>
(cherry picked from commit 5d58df8a19)
7 lines
204 B
JavaScript
7 lines
204 B
JavaScript
export function base64_url_encode(input) {
|
|
let output = btoa(input)
|
|
output = output.replaceAll('+', '.')
|
|
output = output.replaceAll('/', '_')
|
|
output = output.replaceAll('=', '-')
|
|
return output
|
|
} |