qb-buf2str

1.0.1 • Public • Published

qb-buf2str

Convert a buffer or array of bytes into an concise string, or return the value if it is not an array of bytes.

ASCII buffers (containing all printable ascii characters) are converted to ascii strings. Other byte buffers are converted to hex.

This function is used by qb-debug to convert byte buffers buffers to useful/readable output.

stringify

Converts an object to a JSON string, recursively applying buf2str on byte buffers.

Package Sidebar

Install

npm i qb-buf2str

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

7.47 kB

Total Files

5

Last publish

Collaborators

  • mvoss9000