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

ast-types

Package Overview
Dependencies
Maintainers
1
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-types - npm Package Compare versions

Comparing version 0.3.29 to 0.3.30

28

lib/node-path.js

@@ -170,13 +170,21 @@ var assert = require("assert");

if (n.SequenceExpression.check(node))
return n.CallExpression.check(parent)
|| n.UnaryExpression.check(parent)
|| isBinary(parent)
|| n.VariableDeclarator.check(parent)
|| n.MemberExpression.check(parent)
|| n.ArrayExpression.check(parent)
|| n.Property.check(parent)
|| n.ConditionalExpression.check(parent)
|| n.AssignmentExpression.check(parent);
if (n.SequenceExpression.check(node)) {
if (n.ForStatement.check(parent)) {
// Although parentheses wouldn't hurt around sequence
// expressions in the head of for loops, traditional style
// dictates that e.g. i++, j++ should not be wrapped with
// parentheses.
return false;
}
if (n.ExpressionStatement.check(parent) &&
this.name === "expression") {
return false;
}
// Otherwise err on the side of overparenthesization, adding
// explicit exceptions above if this proves overzealous.
return true;
}
if (n.YieldExpression.check(node))

@@ -183,0 +191,0 @@ return isBinary(parent)

@@ -21,3 +21,3 @@ {

],
"version": "0.3.29",
"version": "0.3.30",
"homepage": "http://github.com/benjamn/ast-types",

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