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

h2x-traverse

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

h2x-traverse - npm Package Compare versions

Comparing version 0.1.3 to 0.1.6

15

lib/NodePath.js

@@ -19,2 +19,3 @@ 'use strict';

const node = container[key];
if (!node) return null;
return new NodePath({

@@ -64,2 +65,9 @@ listKey,

resyncKey() {
if (!this.container) return;
for (let i = 0; i < this.container.length; i += 1) {
if (this.container[i] === this.node) this.key = i;
}
}
replace(node) {

@@ -69,3 +77,3 @@ this.shouldStop = true;

this.container[this.key] = node;
this.context.visit(this.container, this.key);
this.requeue();
}

@@ -85,4 +93,9 @@

this.node = null;
this.requeue();
}
requeue() {
this.context.visit(this.parent, this.listKey);
}
_call(fns) {

@@ -89,0 +102,0 @@ if (!fns) return false;

7

lib/TraversalContext.js

@@ -32,10 +32,5 @@ 'use strict';

const paths = [];
Array.from(container).forEach((value, key) => {
if (shouldStop) return;
const nodePath = this.create(parent, container, key, listKey);
paths.push(nodePath);
});
paths.forEach(nodePath => {
if (nodePath && nodePath.visit()) shouldStop = true;

@@ -42,0 +37,0 @@ });

{
"name": "h2x-traverse",
"description": "Traverse and modify h2x AST.",
"version": "0.1.3",
"version": "0.1.6",
"repository": "https://github.com/smooth-code/h2x/tree/master/packages/h2x-traverse",

@@ -6,0 +6,0 @@ "author": "Bergé Greg <berge.greg@gmail.com>",

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