@dancasey/hexdump
v1.0.0
Published
A very simple console hexdump for Node.js
Readme
hexdump
A very simple console hexdump for Node.js
- can highlight a range of bytes
- no ascii column, just bytes
get it
npm install --save @dancasey/hexdumpimport it
import hexdump from "@dancasey/hexdump"alternatively
const hexdump = require("@dancasey/hexdump").default use it
let buf = Buffer.from("hello there, this is a buffer from some text")
hexdump(buf, 13, 4)result

API
/**
* A very simple console hexdump for Node.js
* @param {Buffer} buffer The Node.js buffer to print
* @param {number} [hlStart] The (first) byte to highlight (defaults to no highlights)
* @param {number} [hlLength=1] The number of bytes to highlight (defaults to one, if `hlStart` given)
*/
export default function hexdump(buffer: Buffer, hlStart?: number, hlLength?: number): void;