mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-25 09:16:15 -04:00
feat(tools): added base64 string converter
This commit is contained in:
parent
34800f461d
commit
67bc09ccfd
2 changed files with 67 additions and 0 deletions
7
utils/convert.ts
Normal file
7
utils/convert.ts
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue