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.7.5 to 0.8.0

10

lib/esiExpressionParser.js

@@ -31,2 +31,12 @@ "use strict";

const arithmeticMatch = str.match(/(.*?(?:\d|\)|'))\s*(\+|-|\*|\/|%)\s*((?:-|\(|\$|\d|').*)/);
if (arithmeticMatch) {
return {
type: "BinaryExpression",
operator: arithmeticMatch[2],
left: esiExpressionParser(arithmeticMatch[1]),
right: esiExpressionParser(arithmeticMatch[3])
};
}
const callExpressionMatch = str.match(/^\$(\w+?)\((.+?)\)$/);

@@ -33,0 +43,0 @@ if (callExpressionMatch) {

@@ -58,2 +58,7 @@ "use strict";

if (node.operator === ">") return left > right;
if (node.operator === "+") return left + right;
if (node.operator === "-") return left - right;
if (node.operator === "*") return left * right;
if (node.operator === "/") return left / right;
if (node.operator === "%") return left % right;
if (node.operator === "has") return left.indexOf(right) > -1;

@@ -60,0 +65,0 @@ if (node.operator === "has_i") return left.toLowerCase().indexOf(right.toLowerCase()) > -1;

2

package.json
{
"name": "@bonniernews/local-esi",
"version": "0.7.5",
"version": "0.8.0",
"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