(y-provider) create utils function toBase64

Add utility function to convert BitArray to Base64 string.
This is required for creating Base64-encoded documents,
as the frontend do.
This commit is contained in:
lebaudantoine
2024-12-10 16:57:04 +01:00
committed by aleb_the_flash
parent 19042907be
commit 3fef7596b3

View File

@@ -7,3 +7,7 @@ export function logger(...args: any[]) {
console.log(...args);
}
}
export const toBase64 = function (str: Uint8Array) {
return Buffer.from(str).toString('base64');
};