Convert between Strings, Buffers and Objects in Node.js
Much of what you’ll read here is available on the official docs and with a bit of time you could’ve collected the information yourself. But since I’ve already did that part and want to have a plain “summary” of it, I’d say a good blog post about it won’t hurt. If you already know what’s described here, perhaps this will serve as a quick reference/cheatsheet.
Buffers are sequences of values representing bytes therefore converting strings strictly into/from buffers can be done using arbitrary values. I’m explicitly specifying the already default utf-8 encoding to hint that it can be changed.