Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bin-protocol

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bin-protocol - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

5

lib/protobuf/index.js

@@ -417,3 +417,6 @@ 'use strict';

}
if (Buffer.isBuffer(value) || typeof value === 'string') {
if (typeof value === 'string') {
value = new Buffer(value, 'utf8');
}
if (Buffer.isBuffer(value)) {
this

@@ -420,0 +423,0 @@ .UVarint(value.length)

2

package.json

@@ -9,3 +9,3 @@ {

},
"version": "2.0.4",
"version": "2.0.5",
"main": "./lib/index.js",

@@ -12,0 +12,0 @@ "keywords": ["buffer", "raw", "binary", "protocol", "parser", "reader", "builder"],

@@ -279,2 +279,8 @@ 'use strict';

it('bytes - UTF8 string', function () {
var str = '人人生而自由,在尊嚴和權利上一律平等。';
var encoded = protocol.write().bytes(str).result;
protocol.read(encoded).bytes().result.toString('utf8').should.be.eql(str);
});
it('bytes - zero length', function () {

@@ -281,0 +287,0 @@ var buf = new Buffer(0);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc