🚀 Launch Week Day 5:Introducing Immutable Scans.Learn More →
Socket
Book a DemoInstallSign in
Socket

hexpp

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexpp

pretty print for binary buffers

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

hexpp

Pretty print buffers in the same format as hexdump -C

var hexpp = require('hexpp')
var binary = new Buffer('hello, binary world!')

console.log(hexpp(binary))

output:

00000000  68 65 6c 6c 6f 2c 20 62  69 6e 61 72 79 20 77 6f  |hello, binary wo|
00000010  72 6c 64 21                                       |rld!|

hexpp(buffer, line, showLength)

buffer is a binary buffer,

if line is provided, it will be added to the line number (left column) you should use this if you are printing a stream of buffers with more than one call to hexpp.

if showLength is true, return a final line with the length of the total buffer in the line column.

License

MIT

FAQs

Package last updated on 22 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts