New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eramux/graph-structure

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eramux/graph-structure - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

README.md

2

dist/Graph.d.ts

@@ -18,2 +18,4 @@ declare type NodeId = string;

get nodes(): NodeId[];
get entryNodes(): NodeId[];
get exitNodes(): NodeId[];
addNode(node: NodeId): this;

@@ -20,0 +22,0 @@ removeNode(node: NodeId): this;

29

dist/Graph.js

@@ -27,2 +27,22 @@ "use strict";

}
get entryNodes() {
const nodeSet = new Set();
this.edges.forEach((targetNodes, sourceNode) => {
const inboundNodes = this.inbound(sourceNode);
if (inboundNodes.length === 0) {
nodeSet.add(sourceNode);
}
});
return [...nodeSet.values()];
}
get exitNodes() {
const nodeSet = new Set();
this.edges.forEach((targetNodes, sourceNode) => {
const outboundNodes = this.outbound(sourceNode);
if (outboundNodes.length === 0) {
nodeSet.add(sourceNode);
}
});
return [...nodeSet.values()];
}
addNode(node) {

@@ -96,5 +116,2 @@ this.edges.set(node, this.adjacent(node));

}
if (typeof includeSourceNodes !== "boolean") {
includeSourceNodes = true;
}
const visited = {};

@@ -131,3 +148,2 @@ const visiting = {};

this.depthFirstSearch(undefined, true, true);
return false;
}

@@ -138,6 +154,5 @@ catch (error) {

}
else {
throw error;
}
throw error;
}
return false;
}

@@ -144,0 +159,0 @@ lowestCommonAncestors(node1, node2) {

{
"name": "@eramux/graph-structure",
"version": "0.1.4",
"version": "0.1.5",
"description": "Typescript graph structure library for common graph operations",

@@ -13,2 +13,3 @@ "main": "dist/Graph.js",

"test": "jest --forceExit --coverage --detectOpenHandles",
"test-ci": "jest --ci --coverage",
"lint": "eslint --fix --ext .ts --ignore-path .gitignore ."

@@ -15,0 +16,0 @@ },

Sorry, the diff of this file is not supported yet

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