mirror of
https://github.com/arthur-pbty/portfolio2023.git
synced 2026-06-04 15:56:24 +02:00
12 lines
243 B
JavaScript
12 lines
243 B
JavaScript
module.exports.encode = (string) => {
|
|
const buffer = Buffer.from(string, 'utf8');
|
|
|
|
return buffer.toString('base64');
|
|
};
|
|
|
|
module.exports.decode = (string) => {
|
|
const buffer = Buffer.from(string, 'base64');
|
|
|
|
return buffer.toString();
|
|
};
|