✨(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:
committed by
aleb_the_flash
parent
19042907be
commit
3fef7596b3
@@ -7,3 +7,7 @@ export function logger(...args: any[]) {
|
||||
console.log(...args);
|
||||
}
|
||||
}
|
||||
|
||||
export const toBase64 = function (str: Uint8Array) {
|
||||
return Buffer.from(str).toString('base64');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user