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

ast-query

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-query - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

lib/nodes/CallExpression.js

@@ -14,3 +14,5 @@ 'use strict';

this.type = 'CallExpression';
this.arguments = new ArrayExpression({elements: this.nodes[0].arguments});
var args = this.nodes[0] ? this.nodes[0].arguments : [];
this.arguments = new ArrayExpression({ elements: args });
},

@@ -17,0 +19,0 @@

{
"name": "ast-query",
"version": "1.0.0",
"version": "1.0.1",
"description": "Declarative JavaScript AST modification façade",

@@ -5,0 +5,0 @@ "main": "lib/tree.js",

@@ -13,2 +13,3 @@ /*globals describe, it, beforeEach */

this.tree3 = program('bar.doe.foo();');
this.tree4 = program('var a;');
});

@@ -25,2 +26,6 @@

it('can match no node', function () {
assert.equal(this.tree4.callExpression('bar').length, 0);
});
describe('#arguments', function () {

@@ -27,0 +32,0 @@ describe('#push()', function () {

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