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

graphology-operators

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphology-operators - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

2

package.json
{
"name": "graphology-operators",
"version": "1.4.2",
"version": "1.4.3",
"description": "Miscellaneous operators for graphology.",

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

@@ -114,2 +114,4 @@ # Graphology Operators

If passing a multi graph, undirected edges will only be converted as pairs ofmutual ones and will never be merged.
```js

@@ -159,2 +161,4 @@ import {toDirected} from 'graphology-operators';

If passing a multi graph, directed edges will only be converted as undirected ones and will never be merged.
```js

@@ -161,0 +165,0 @@ import {toUndirected} from 'graphology-operators';

@@ -35,5 +35,10 @@ /**

var existingOutEdge =
graph.type === 'mixed' && directedGraph.edge(source, target);
!graph.multi &&
graph.type === 'mixed' &&
directedGraph.edge(source, target);
var existingInEdge =
graph.type === 'mixed' && directedGraph.edge(target, source);
!graph.multi &&
graph.type === 'mixed' &&
directedGraph.edge(target, source);

@@ -40,0 +45,0 @@ if (existingOutEdge) {

@@ -34,13 +34,15 @@ /**

graph.forEachDirectedEdge(function (edge, attr, source, target) {
var existingEdge = undirectedGraph.edge(source, target);
if (!graph.multi) {
var existingEdge = undirectedGraph.edge(source, target);
if (existingEdge) {
// We need to merge
if (mergeEdge)
undirectedGraph.replaceEdgeAttributes(
existingEdge,
mergeEdge(undirectedGraph.getEdgeAttributes(existingEdge), attr)
);
if (existingEdge) {
// We need to merge
if (mergeEdge)
undirectedGraph.replaceEdgeAttributes(
existingEdge,
mergeEdge(undirectedGraph.getEdgeAttributes(existingEdge), attr)
);
return;
return;
}
}

@@ -47,0 +49,0 @@

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