Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hexdump.js

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexdump.js

Like hexdump on *nix, but in JavaScript.

  • 1.0.9
  • npm
  • Socket score

Version published
Weekly downloads
8
Maintainers
1
Weekly downloads
 
Created
Source

hexdump.js

| Sponsored by Daplie |

Given an ArrayBuffer, will create string output similar to the unix hexdump command.

For example, the text of "Hello, World!\n" looks something like this:

        0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
0000000 48 65 6c 6c 6f 2c 20 57 6f 72 6c 64 21 0a
000000e

Usage

So far it just does one thing: print an ArrayBuffer in hex, with a header:

JavaScript

var hexdump = require('hexdump.js').hexdump;

var str = hexdump(new Uint8Array([ 0, 1, 2, 127, 254, 255 ]));

console.log(str);

Browser

console.log(window.hexdump(new Uint8Array([ 0, 1, 2, 127, 254, 255 ])));

CLI

hexdump.js <filepath>

Install

Decentralized:

# As a library
npm install --save 'git+https://git.coolaj86.com/coolaj86/hexdump.js.git'

# As a global CLI (useful on windows)
npm install --global 'git+https://git.coolaj86.com/coolaj86/hexdump.js.git'

Centralized:

# As a library
npm install --save hexdump.js

# As a global CLI (useful on windows)
npm install --global hexdump.js

API

hexdump(arrayBuffer, byteOffset, byteLength);

Keywords

FAQs

Package last updated on 29 Oct 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc