msgpack-bin
Advanced tools
Comparing version 0.2.6 to 0.3.0-1
@@ -20,2 +20,7 @@ // Wrap a nicer JavaScript API that wraps the direct MessagePack bindings. | ||
exports.unpack = unpack; | ||
exports.unpackb = function unpackb(buf){ | ||
var result = unpack(buf, true) | ||
unpackb.bytes_remaining = unpack.bytes_remaining | ||
return result | ||
} | ||
@@ -22,0 +27,0 @@ function pack() { |
{ | ||
"name": "msgpack-bin", | ||
"description": "A space-efficient object serialization library for node.js", | ||
"version": "0.2.6", | ||
"version": "0.3.0-1", | ||
"homepage": "https://github.com/diunko/msgpack-node", | ||
@@ -68,3 +68,3 @@ "contributors": [ | ||
"dependencies" : { | ||
"nan" : "^1.6.2" | ||
"nan" : "^2.0.9" | ||
}, | ||
@@ -71,0 +71,0 @@ "devDependencies": { |
@@ -47,8 +47,8 @@ var msgpack = require("../../lib/msgpack"), | ||
}, | ||
// 'test unpacking a buffer' : function (test) { | ||
// test.expect(1); | ||
// var testBuffer = new Buffer([0x00, 0x01, 0x02]); | ||
// test.deepEqual(testBuffer, msgpack.unpack(msgpack.pack(testBuffer), true)); | ||
// test.done(); | ||
// }, | ||
'test unpacking a buffer' : function (test) { | ||
test.expect(1); | ||
var testBuffer = new Buffer([0x00, 0x01, 0x02]); | ||
test.deepEqual(testBuffer, msgpack.unpack(msgpack.pack(testBuffer), true)); | ||
test.done(); | ||
}, | ||
'test for numeric equality' : function (test) { | ||
@@ -112,2 +112,9 @@ test.expect(2); | ||
}, | ||
'test for object with buffers' : function (test) { | ||
test.expect(2); | ||
var object = {'a' : [1, 2, 3], 'b' : Buffer('cdef'), 'c' : {'nuts' : Buffer('qqq')}}; | ||
test.deepEqual(object, msgpack.unpack(msgpack.pack(object), true)); | ||
test.isObject(msgpack.unpack(msgpack.pack(object), true)); | ||
test.done(); | ||
}, | ||
'test for 2^31 negative' : function (test) { | ||
@@ -114,0 +121,0 @@ test.expect(2); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1476817
575
+ Addednan@2.22.1(transitive)
- Removednan@1.9.0(transitive)
Updatednan@^2.0.9