📅  最后修改于: 2022-03-11 15:02:10.887000             🧑  作者: Mango
// a string
const str = "Hey. this is a string!";
// convert string to Buffer
const buff = Buffer.from(str, "utf-8");
console.log(buff); //