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

cortez2

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cortez2 - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

package.json
{
"name": "cortez2",
"version": "2.0.1",
"version": "2.0.2",
"description": "A node module providing some basic data structures with pure js implementation",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,2 +0,2 @@

module.exports = (frontierManager) => (isGoal, startNodeId, graph) => {
module.exports = (frontierManager) => (isGoal, startNodeId, graph, expand) => {
const discovered = {};

@@ -14,3 +14,3 @@ const fm = frontierManager();

graph.getEdgesFrom(last).forEach((edgeId) => {
expand(last).forEach((edgeId) => {
const edge = graph.edges[edgeId];

@@ -17,0 +17,0 @@ if (!discovered[edge.targetId]) {

@@ -37,3 +37,3 @@ const graph = require('./index');

const g = buildGraph();
const path = dfs((nodeId) => nodeId % 3 === 2, 0, g).map((edge) => edge.targetId);
const path = dfs((nodeId) => nodeId % 3 === 2, 0, g, g.getEdgesFrom).map((edge) => edge.targetId);
expect(path).toEqual([0, 3, 6, 11]);

@@ -44,4 +44,4 @@ });

const g = buildGraph();
const path = bfs((nodeId) => nodeId % 3 == 2, 0, g).map((edge) => edge.targetId);
const path = bfs((nodeId) => nodeId % 3 == 2, 0, g, g.getEdgesFrom).map((edge) => edge.targetId);
expect(path).toEqual([0, 2]);
});

@@ -52,2 +52,3 @@ const sequence = require('../sequence');

const getEdgesFrom = (nodeId) => outbound[nodeId] || new Set();
const getEdges = (nodeId) => new Set([...getEdgesTo(nodeId), ...getEdgesFrom(nodeId)]);

@@ -104,2 +105,3 @@ const disconnectNode = (nodeId) => {

getEdgesFrom,
getEdges,
disconnectNode,

@@ -106,0 +108,0 @@ removeNode,

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