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

estraverse

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

estraverse - npm Package Compare versions

Comparing version 1.7.0 to 1.7.1

24

estraverse.js

@@ -542,4 +542,5 @@ /*

Controller.prototype.replace = function replace(root, visitor) {
function removeElem() {
function removeElem(element) {
var i,
key,
nextElem,

@@ -549,11 +550,16 @@ parent;

if (element.ref.remove()) {
// When the reference is an element of an array.
key = element.ref.key;
parent = element.ref.parent;
// if removed from array, then shift following items' keys
for (i = 1; i < worklist.length; i++) {
// If removed from array, then decrease following items' keys.
i = worklist.length;
while (i--) {
nextElem = worklist[i];
if (nextElem === sentinel || nextElem.ref.parent !== parent) {
break;
if (nextElem.ref && nextElem.ref.parent === parent) {
if (nextElem.ref.key < key) {
break;
}
--nextElem.ref.key;
}
nextElem.path[nextElem.path.length - 1] = --nextElem.ref.key;
}

@@ -609,3 +615,3 @@ }

if (this.__state === REMOVE || target === REMOVE) {
removeElem();
removeElem(element);
}

@@ -630,3 +636,3 @@

if (this.__state === REMOVE || target === REMOVE) {
removeElem();
removeElem(element);
element.node = null;

@@ -820,3 +826,3 @@ }

exports.version = '1.5.1-dev';
exports.version = '1.7.1';
exports.Syntax = Syntax;

@@ -823,0 +829,0 @@ exports.traverse = traverse;

@@ -6,3 +6,3 @@ {

"main": "estraverse.js",
"version": "1.7.0",
"version": "1.7.1",
"engines": {

@@ -9,0 +9,0 @@ "node": ">=0.10.0"

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