mendekode data mentah ke string nodeJs

The String Decoder module provides a way of decoding Buffer objects into strings.
See example from w3school below:

var StringDecoder = require('string_decoder').StringDecoder;
var d = new StringDecoder('utf8');
var b = Buffer('abc');

console.log(b); //write buffer
console.log(d.write(b)); // write decoded buffer;
Wide-eyed Wildebeest