📜  将缓冲区转换为 base64 javascript 代码示例

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

代码示例3
var buffer = Buffer.from('hello');//create a buffer of the text "hello"
//right now, buffer == 
var string64 = buffer.toString('base64');
//the .toString operator can set encoding
//string64 == 'aGVsbG8='