clean up code and logs (#1809)

abstract base64 functions and clean up console logs
This commit is contained in:
Matt Hill
2022-09-19 12:59:41 -06:00
committed by GitHub
parent f04b90d9c6
commit 1150f4c438
13 changed files with 27 additions and 32 deletions

View File

@@ -0,0 +1,9 @@
import * as Base64 from 'base64-js'
export function encodeBase64(text: string) {
return Base64.fromByteArray(new TextEncoder().encode(text))
}
export function decodeBase64(encoded: string) {
return new TextDecoder().decode(Base64.toByteArray(encoded))
}