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

@protobufjs/codegen

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@protobufjs/codegen - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

18

index.js

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

function str(name) {
return "function " + (name ? name.replace(/[^\w_$]/g, "_") : "") + "(" + params.join(", ") + ") {\n" + src.join("\n") + "\n}";
return "function" + (name ? " " + name.replace(/[^\w_$]/g, "_") : "") + "(" + params.join(",") + ") {\n" + src.join("\n") + "\n}";
}

@@ -125,13 +125,17 @@

i = 0;
return format.replace(/%([djs])/g, function($0, $1) {
var arg = args[i++];
format = format.replace(/%([dfjs])/g, function($0, $1) {
switch ($1) {
case "d":
return Math.floor(args[i++]);
case "f":
return Number(args[i++]);
case "j":
return JSON.stringify(arg);
case "d":
return Number(arg);
return JSON.stringify(args[i++]);
default:
return String(arg);
return args[i++];
}
});
if (i !== args.length)
throw Error("argument count mismatch");
return format;
}

@@ -138,0 +142,0 @@

{
"name": "@protobufjs/codegen",
"description": "A closure for generating functions programmatically.",
"version": "1.0.6",
"version": "1.0.7",
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",

@@ -6,0 +6,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