Socket
Socket
Sign inDemoInstall

@dxos/codec-protobuf

Package Overview
Dependencies
Maintainers
3
Versions
2980
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dxos/codec-protobuf - npm Package Compare versions

Comparing version 1.1.0-beta.5 to 1.1.0-beta.6

16

dist/codec-protobuf.js

@@ -199,3 +199,3 @@ "use strict";

const object = this._iterate(value, value => {
const object = this._iterate(type, value, null, (value, parentProp) => {
if (!value.__type_url) {

@@ -205,2 +205,6 @@ return;

if (type.fields[parentProp].type !== 'google.protobuf.Any') {
throw new Error(`Invalid __type_url for a non google.protobuf.Any: ${type.name}.${parentProp}`);
}
const {

@@ -288,3 +292,3 @@ __type_url: typeUrl,

const object = this._iterate(value, value => {
const object = this._iterate(type, value, null, value => {
// Test if already decoded.

@@ -323,3 +327,3 @@ if (value.__type_url) {

_iterate(value, callback) {
_iterate(type, value, parentProp, callback) {
if (typeof value !== 'object') return value;

@@ -331,3 +335,3 @@ let tmp;

if (str === '[object Object]') {
const result = callback(value);
const result = callback(value, parentProp);

@@ -341,3 +345,3 @@ if (result) {

for (prop in value) {
tmp[prop] = this._iterate(value[prop], callback);
tmp[prop] = this._iterate(type, value[prop], prop, callback);
}

@@ -352,3 +356,3 @@

for (tmp = new Array(prop); prop--;) {
tmp[prop] = this._iterate(value[prop], callback);
tmp[prop] = this._iterate(type, value[prop], parentProp, callback);
}

@@ -355,0 +359,0 @@

{
"name": "@dxos/codec-protobuf",
"version": "1.1.0-beta.5",
"version": "1.1.0-beta.6",
"description": "Value encoding for protobuf.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/dxos/codec-protobuf#readme",

Sorry, the diff of this file is not supported yet

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