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

static-eval

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

static-eval - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

3

index.js

@@ -41,3 +41,4 @@ var unparse = require('escodegen').generate;

}
else if (node.type === 'BinaryExpression') {
else if (node.type === 'BinaryExpression' ||
node.type === 'LogicalExpression') {
var l = walk(node.left);

@@ -44,0 +45,0 @@ if (l === FAIL) return FAIL;

{
"name": "static-eval",
"version": "0.2.2",
"version": "0.2.3",
"description": "evaluate statically-analyzable expressions",

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

@@ -8,6 +8,6 @@ var test = require('tape');

var src = '[1,2,3+4*10+n,foo(3+5),obj[""+"x"].y]';
var src = '[1,2,3+4*10+(n||6),foo(3+5),obj[""+"x"].y]';
var ast = parse(src).body[0].expression;
var res = evaluate(ast, {
n: 6,
n: false,
foo: function (x) { return x * 100 },

@@ -14,0 +14,0 @@ obj: { x: { y: 555 } }

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