Use Buffer package instead of Buffer on nodejs

This commit is contained in:
Thunnini 2022-12-12 16:12:04 +09:00
parent b47c09fb6f
commit 1ea85324aa

View File

@ -1,5 +1,7 @@
export function base64URLEncode(str: Buffer) {
return str
import { Buffer } from "buffer/";
export function base64URLEncode(str: Uint8Array) {
return Buffer.from(str)
.toString("base64")
.replace(/\+/g, "-")
.replace(/\//g, "_")