Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
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

Source
npmnpm
Version
1.1.2
Version published
Weekly downloads
146
180.77%
Maintainers
1
Weekly downloads
 
Created
Source

hexpp

Pretty print buffers with configurable grouping and wrapping. more useful than node's Buffer#toString()

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

console.log(hexpp(binary, {groups: 4, wrap: 16}))

output:

68656c6c 6f2c2062 696e6172 7920776f
726c6421

hexpp(buffer, opts={groups: n, wrap: m, ascii})

buffer is a binary buffer, and opts is an optional object, groups is how many bytes before a space is inserted (default 4), wrap is how many bytes before a newline is inserted (default 16), ascii is whether to display ascii printables (non-printables replaced with '.')

it will look weird if wrap is not a multiple of groups.

License

MIT

FAQs

Package last updated on 14 Oct 2014

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