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

versatile-tree

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

versatile-tree - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

27

dist/TreeNode.js

@@ -617,22 +617,15 @@ "use strict";

walk(visit, rightToLeft) {
const abort = !!visit(this);
let abort = !!visit(this);
if (!abort) {
if (rightToLeft) {
for (let i = this.children.length - 1; i >= 0; i--) {
const childNode = this.children[i];
const abortChild = childNode.walk(visit, rightToLeft);
if (abortChild) {
break;
}
let i = rightToLeft ? this.children.length - 1 : 0;
const condition = () => (rightToLeft ? i >= 0 : i < this.children.length);
const update = () => (rightToLeft ? i-- : i++);
while (condition()) {
const childNode = this.children[i];
abort = childNode.walk(visit, rightToLeft);
if (abort) {
break;
}
update();
}
else {
for (let i = 0; i < this.children.length; i++) {
const childNode = this.children[i];
const abortChild = childNode.walk(visit, rightToLeft);
if (abortChild) {
break;
}
}
}
}

@@ -639,0 +632,0 @@ return abort;

{
"name": "versatile-tree",
"version": "1.1.2",
"version": "1.1.3",
"author": "Justin Mahar <contact@justinmahar.com>",

@@ -5,0 +5,0 @@ "description": "A highly versatile tree structure for JavaScript.",

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