Why does console.log(buffer) give me a hexadecimal list?

Ray nailed it in his comment. See the Buffer documentation; you have to specify an encoding argument (you probably want 'utf8') on a Buffer’s toString.

// coffeescript
console.log buffer.toString 'utf8'
// javascript
console.log(buffer.toString('utf8'));

Leave a Comment