Comparing version 0.2.6 to 0.2.7
@@ -130,3 +130,2 @@ //= hexy.js -- utility to create hex dumps | ||
var hexy = function (buffer, config) { | ||
config = config || {} | ||
var h = new Hexy(buffer, config) | ||
@@ -138,2 +137,5 @@ return h.toString() | ||
var self = this | ||
buffer = (Buffer.isBuffer(buffer) && buffer) || (typeof buffer === 'string' && new Buffer(buffer)) || new Buffer(0) | ||
config = config || {} | ||
@@ -140,0 +142,0 @@ self.buffer = buffer // magic string conversion here? |
{ | ||
"name" : "hexy", | ||
"version" : "0.2.6", | ||
"version" : "0.2.7", | ||
"description" : "hexdump, binary pretty-printing", | ||
@@ -5,0 +5,0 @@ "author" : "Tim Becker <tim.becker@kuriositaet.de>", |
@@ -125,2 +125,3 @@ [![build status](https://secure.travis-ci.org/a2800276/hexy.js.png)](http://travis-ci.org/a2800276/hexy.js) | ||
* radare (https://github.com/radare) | ||
* Michele Caini (https://github.com/skypjack) | ||
@@ -127,0 +128,0 @@ ## History |
@@ -149,2 +149,8 @@ var hexy = require("./hexy.js") | ||
// empty string/buffer/nil etc should return empty string, as does xxd | ||
var empties = ["", undefined, null] | ||
empties.forEach( function (empty) { | ||
failed += check("", hexy.hexy(empty)) | ||
}) | ||
p("failed: "+failed+" of "+total) | ||
@@ -155,1 +161,3 @@ | ||
} | ||
141
24645
53754
8
511