Comparing version 3.4.0 to 3.4.1
@@ -25,3 +25,5 @@ var bl = require('bl') | ||
buf[0] = 0xa0 | len | ||
buf.write(obj, 1) | ||
if (len > 0) { | ||
buf.write(obj, 1) | ||
} | ||
} else if (len <= 0xff && !compatibilityMode) { | ||
@@ -28,0 +30,0 @@ // str8, but only when not in compatibility mode |
{ | ||
"name": "msgpack5", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "A msgpack v5 implementation for node.js and the browser, with extension points", | ||
@@ -40,3 +40,3 @@ "main": "index.js", | ||
"pre-commit": "1.0.10", | ||
"standard": "^6.0.4", | ||
"standard": "^8.0.0", | ||
"tape": "^4.0.0", | ||
@@ -43,0 +43,0 @@ "testling": "^1.7.1", |
@@ -12,3 +12,3 @@ 'use strict' | ||
// build base | ||
for (var i = 'a'; i.length < 32; i += 'a') { | ||
for (var i = ''; i.length < 32; i += 'a') { | ||
all.push(i) | ||
@@ -30,3 +30,5 @@ } | ||
buf[0] = 0xa0 | Buffer.byteLength(str) | ||
buf.write(str, 1) | ||
if (str.length > 0) { | ||
buf.write(str, 1) | ||
} | ||
t.equal(encoder.decode(buf), str, 'must decode correctly') | ||
@@ -33,0 +35,0 @@ t.end() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
444259
9172