📜  在 Node.js 中编码和解码 Base64 字符串 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:24.345000             🧑  作者: Mango

代码示例2
'use strict';

let data = 'stackabuse.com';
let buff = new Buffer(data);
let base64data = buff.toString('base64');

console.log('"' + data + '" converted to Base64 is "' + base64data + '"');