New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

protobuf.js

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protobuf.js - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

@@ -218,15 +218,17 @@ var fs = require('fs'),

if (Array.isArray(params[key])) {
var ret = [];
params[key].forEach(function (item) {
ret.push(self.encode(schema[key].raw_type, item));
});
params[key] = ret.map(function (item) {
var arr = bufferToArray(item),
len = bufferToArray(encode(arr.length)),
head = [(schema[key].field << 3) + schema[key].type];
return head.concat(len).concat(arr);
}).reduce(function (a, b) {
return a.concat(b);
});
bytes = bytes.concat(params[key]);
if (params[key].length > 0) {
var ret = [];
params[key].forEach(function (item) {
ret.push(self.encode(schema[key].raw_type, item));
});
params[key] = ret.map(function (item) {
var arr = bufferToArray(item),
len = bufferToArray(encode(arr.length)),
head = [(schema[key].field << 3) + schema[key].type];
return head.concat(len).concat(arr);
}).reduce(function (a, b) {
return a.concat(b);
});
bytes = bytes.concat(params[key]);
}
} else {

@@ -233,0 +235,0 @@ params[key] = self.encode(schema[key].raw_type, params[key]);

{
"name": "protobuf.js",
"version": "0.0.6",
"version": "0.0.7",
"description": "a pure javascript protocol buffer encoding implementation, written specifically for riak",

@@ -5,0 +5,0 @@ "main": "index.js",