Comparing version 0.3.0 to 0.3.1
0.3.1 / 2014-06-09 | ||
================== | ||
* src: allow Buffers returned from `reinterpretUntilZeros()` up to `kMaxLength` bytes | ||
* test: move the reinterpretUntilZeros() tests to their own file | ||
* test: fix `Buffer#inspect()` test on Windows | ||
0.3.0 / 2014-06-08 | ||
@@ -3,0 +10,0 @@ ================== |
@@ -20,3 +20,3 @@ { | ||
], | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)", | ||
@@ -23,0 +23,0 @@ "repository": { |
@@ -47,3 +47,3 @@ | ||
it('should overwrite the default Buffer#inspect() to print the memory address', function () { | ||
assert(buf.inspect().indexOf(buf.address().toString(16)) !== -1) | ||
assert(buf.inspect().indexOf(buf.hexAddress()) !== -1) | ||
}) | ||
@@ -50,0 +50,0 @@ |
@@ -45,24 +45,2 @@ | ||
describe('reinterpretUntilZeros()', function () { | ||
it('should return a new Buffer instance up until the first 0', function () { | ||
var buf = new Buffer('hello\0world') | ||
var buf2 = buf.reinterpretUntilZeros(1) | ||
assert.equal(buf2.length, 'hello'.length) | ||
assert.equal(buf2.toString(), 'hello') | ||
}) | ||
it('should return a new Buffer instance up until the first 2-byte sequence of 0s', function () { | ||
var str = 'hello world' | ||
var buf = new Buffer(50) | ||
var len = buf.write(str, 'ucs2') | ||
buf.writeInt16LE(0, len) // NULL terminate the string | ||
var buf2 = buf.reinterpretUntilZeros(2) | ||
assert.equal(str.length, buf2.length / 2) | ||
assert.equal(buf2.toString('ucs2'), str) | ||
}) | ||
}) | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
427254
37
2875
2
4