A better Buffer.toString()
Displays buffer content in hex. Characters are grouped into two-character bytes, with a customizable line wrap width.
Install
$ npm install --save buffer-to-string
Usage
const bufferToString = ; ;/*00 01 0203 04 0506 */
API
bufferToString(buffer, [width])
input
Type: Buffer
The Buffer to stringify.
width
Type: number
Default: 20
The maximum width before wrapping a newline. It is measured in bytes displayed. The maximum character width can be determined by computing (3 * width) - 1
.
License
MIT © Isaac Z. Schlueter, James Talmage