Create buffers from strings using the Buffer.from() function. Like toString(), you can pass an encoding argument to Buffer.from().
By Sandy Halvorson at May 16 2021