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

protocol-buffers

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protocol-buffers - npm Package Compare versions

Comparing version 4.1.1 to 4.1.2

20

compile-to-js.js

@@ -36,2 +36,20 @@ var os = require('os')

function stringifyEnum (map, spaces) {
const keys = Object.keys(map)
const safe = keys.every(function (k) {
if (typeof map[k] !== 'number') return false
return /^[a-z][a-z0-9]+$/i.test(k)
})
if (!safe) return JSON.stringify(map, null, 2).replace(/\n/g, os.EOL) + os.EOL
var out = '{' + os.EOL
keys.forEach(function (k, i) {
out += spaces + ' ' + k + ': ' + map[k] + (i < keys.length - 1 ? ',' : '') + os.EOL
})
return out + spaces + '}' + os.EOL
}
function visit (messages, exports, spaces) {

@@ -50,3 +68,3 @@ var encoders = Object.keys(messages).filter(function (name) {

out += spaces + exports + '.' + name + ' = ' +
JSON.stringify(messages[name], null, 2).replace(/\n/g, os.EOL) + os.EOL + os.EOL
stringifyEnum(messages[name], spaces) + os.EOL
})

@@ -53,0 +71,0 @@

2

package.json
{
"name": "protocol-buffers",
"version": "4.1.1",
"version": "4.1.2",
"description": "Protocol Buffers for Node.js",

@@ -5,0 +5,0 @@ "repository": {

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