icns-frontend/utils/encoding.ts
2022-12-05 19:50:13 +09:00

8 lines
160 B
TypeScript

export function base64URLEncode(str: Buffer) {
return str
.toString("base64")
.replace(/\+/g, "-")
.replace(/\//g, "_")
.replace(/=/g, "");
}