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.1.0 to 0.1.1

test/prop.js

18

index.js

@@ -74,12 +74,12 @@ module.exports = function (ast, vars) {

else if (node.type === 'CallExpression') {
if ({}.hasOwnProperty.call(vars, node.callee.name)) {
var args = [];
for (var i = 0, l = node.arguments.length; i < l; i++) {
var x = walk(node.arguments[i]);
if (x === FAIL) return FAIL;
args.push(x);
}
return vars[node.callee.name].apply(null, args);
var callee = walk(node.callee);
if (callee === FAIL) return FAIL;
var args = [];
for (var i = 0, l = node.arguments.length; i < l; i++) {
var x = walk(node.arguments[i]);
if (x === FAIL) return FAIL;
args.push(x);
}
else return FAIL;
return callee.apply(null, args);
}

@@ -86,0 +86,0 @@ else if (node.type === 'MemberExpression') {

{
"name": "static-eval",
"version": "0.1.0",
"version": "0.1.1",
"description": "evaluate statically-analyzable expressions",

@@ -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