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

graphology-gexf

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphology-gexf - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

34

common/writer.js

@@ -193,12 +193,10 @@ /* eslint no-self-compare: 0 */

function collectNodeData(graph, format) {
var nodes = graph.nodes(),
node,
data;
var nodes = new Array(graph.order);
var i = 0;
for (var i = 0, l = nodes.length; i < l; i++) {
node = nodes[i];
data = format(node, graph.getNodeAttributes(node));
graph.forEachNode(function(node, attr) {
var data = format(node, attr);
data.key = node;
nodes[i] = data;
}
nodes[i++] = data;
});

@@ -216,15 +214,13 @@ return nodes;

function collectEdgeData(graph, reducer) {
var edges = graph.edges(),
edge,
data;
var edges = new Array(graph.size);
var i = 0;
for (var i = 0, l = edges.length; i < l; i++) {
edge = edges[i];
data = reducer(edge, graph.getEdgeAttributes(edge));
graph.forEachEdge(function(edge, attr, source, target, _sa, _ta, undirected) {
var data = reducer(edge, attr);
data.key = edge;
data.source = graph.source(edge);
data.target = graph.target(edge);
data.undirected = graph.isUndirected(edge);
edges[i] = data;
}
data.source = source;
data.target = target;
data.undirected = undirected;
edges[i++] = data;
});

@@ -231,0 +227,0 @@ return edges;

{
"name": "graphology-gexf",
"version": "0.7.2",
"version": "0.7.3",
"description": "GEXF parser & writer for graphology.",

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

"@yomguithereal/eslint-config": "^4.0.0",
"eslint": "^7.15.0",
"graphology": "^0.19.2",
"graphology-types": "^0.19.0",
"eslint": "^7.18.0",
"graphology": "^0.19.3",
"graphology-types": "^0.19.2",
"mocha": "^8.2.1"

@@ -56,3 +56,3 @@ },

"dependencies": {
"graphology-utils": "^1.8.0",
"graphology-utils": "^2.0.0",
"xmldom": "^0.4.0",

@@ -59,0 +59,0 @@ "xml-writer": "^1.7.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