From 9acdc3d3c43ad1970f9dedb08fd86ba4955fcfad Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 25 Sep 2017 12:36:19 -0600 Subject: [PATCH] change name, add README.md --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 4 ++-- test.txt | 1 + 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 test.txt diff --git a/README.md b/README.md index e69de29..cba0be5 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,54 @@ +hexdump.js +========== + +Given an ArrayBuffer, will create similar output to the unix `hexdump` command. + +``` + 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 + +```bash +var hexdump = require('hexdump.js').hexdump; + +var str = hexdump(new Uint8Array([ 0, 1, 2, 127, 254, 255 ])); + +console.log(str); +``` + +### CLI + +```bash +hexdump.js +``` + +Install +------- + +Decentralized: + +```bash +# As a library +npm install --save 'git+https://coolaj86@git.daplie.com/Daplie/hexdump.js.git' + +# As a global CLI (useful on windows) +npm install --global 'git+https://coolaj86@git.daplie.com/Daplie/hexdump.js.git' +``` + +Centralized: + +```bash +# As a library +npm install --save hexdump.js + +# As a global CLI (useful on windows) +npm install --global hexdump.js +``` diff --git a/package.json b/package.json index 69fbc91..1edcf46 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "hexdump", - "version": "1.0.0", + "name": "hexdump.js", + "version": "1.0.1", "description": "Like hexdump on *nix, but in JavaScript.", "main": "hexdump.js", "bin": { diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..8ab686e --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +Hello, World!