🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

bfsearch

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bfsearch - npm Package Compare versions

Comparing version
1.0.2
to
1.1.0
+8
-2
index.js

@@ -6,3 +6,9 @@ function bfsearch(tree, callback) {

const node = queue.shift();
callback(node);
const resp = callback(node);
// if there is a truthy response, assume we found what we are looking for
if (resp) {
return resp;
}

@@ -17,2 +23,2 @@ if (!node.children) continue;

module.exports = bfsearch;
module.exports = bfsearch;
+1
-1
{
"name": "bfsearch",
"version": "1.0.2",
"version": "1.1.0",
"description": "Breadth-first search a tree",

@@ -5,0 +5,0 @@ "main": "index.js",