feat(tools): added base64 string converter

This commit is contained in:
Corentin Thomasset
2021-05-17 19:58:33 +02:00
parent 34800f461d
commit 67bc09ccfd
2 changed files with 67 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
const base64ToString = (str: string) => Buffer.from(str, 'base64').toString('utf-8')
const stringToBase64 = (str: string) => Buffer.from(str, 'utf-8').toString('base64')
export {
stringToBase64,
base64ToString
}