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

@bonniernews/local-esi

Package Overview
Dependencies
Maintainers
6
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bonniernews/local-esi - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

27

lib/esiExpressionParser.js

@@ -49,6 +49,31 @@ "use strict";

},
arguments: callExpressionMatch[2].split(",").map(esiExpressionParser)
arguments: parseFunctionArgsFromString(callExpressionMatch[2]).map(esiExpressionParser)// callExpressionMatch[2].split(",").map(esiExpressionParser)
};
}
function parseFunctionArgsFromString(text) {
const args = [];
let current = "";
let insideString = false;
for (let i = 0; i < text.length; i++) {
const char = text[i];
if (char === "'") {
insideString = !insideString;
}
if (char === "," && !insideString) {
args.push(current);
current = "";
continue;
}
current += char;
if (i === text.length - 1) {
args.push(current);
}
}
return args;
}
const callExpressionWithoutArgsMatch = str.match(/^\$(\w+?)\(\)$/);

@@ -55,0 +80,0 @@ if (callExpressionWithoutArgsMatch) {

2

package.json
{
"name": "@bonniernews/local-esi",
"version": "0.8.1",
"version": "0.8.2",
"description": "Local Edge Side Includes parser",

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

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