change name, add README.md

This commit is contained in:
AJ ONeal 2017-09-25 12:36:19 -06:00
parent d27096feeb
commit 9acdc3d3c4
3 changed files with 57 additions and 2 deletions

View File

@ -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 <filepath>
```
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
```

View File

@ -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": {

1
test.txt Normal file
View File

@ -0,0 +1 @@
Hello, World!