forked from LaconicNetwork/icns-frontend
10 lines
212 B
TypeScript
10 lines
212 B
TypeScript
import { Buffer } from "buffer/";
|
|
|
|
export function base64URLEncode(str: Uint8Array) {
|
|
return Buffer.from(str)
|
|
.toString("base64")
|
|
.replace(/\+/g, "-")
|
|
.replace(/\//g, "_")
|
|
.replace(/=/g, "");
|
|
}
|