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.5.0 to 0.5.1

25

common/parser.js

@@ -123,7 +123,8 @@ /* eslint no-self-compare: 0 */

*
* @param {object} model - Data model to use.
* @param {Node} element - Target DOM element.
* @return {object} - The collected attributes.
* @param {object} model - Data model to use.
* @param {object} defaults - Default values.
* @param {Node} element - Target DOM element.
* @return {object} - The collected attributes.
*/
function collectAttributes(model, element) {
function collectAttributes(model, defaults, element) {
var data = {},

@@ -156,2 +157,10 @@ label = element.getAttribute('label'),

// Applying default values
var k;
for (k in defaults) {
if (!(k in data))
data[k] = defaults[k];
}
// TODO: shortcut here to avoid viz when namespace is not set

@@ -288,5 +297,3 @@

var graph = new Graph({
type: graphType,
defaultNodeAttributes: NODE_DEFAULT_ATTRIBUTES,
defaultEdgeAttributes: EDGE_DEFAULT_ATTRIBUTES
type: graphType
});

@@ -309,3 +316,3 @@

element.getAttribute('id'),
collectAttributes(NODE_MODEL, element)
collectAttributes(NODE_MODEL, NODE_DEFAULT_ATTRIBUTES, element)
);

@@ -322,3 +329,3 @@ }

t = element.getAttribute('target');
attributes = collectAttributes(EDGE_MODEL, element);
attributes = collectAttributes(EDGE_MODEL, EDGE_DEFAULT_ATTRIBUTES, element);

@@ -325,0 +332,0 @@ // If we encountered an edge with a different type, we upgrade the graph

The MIT License (MIT)
Copyright (c) 2016-2017 Guillaume Plique (Yomguithereal)
Copyright (c) 2016-2020 Guillaume Plique (Yomguithereal)

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

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

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

"@yomguithereal/eslint-config": "^4.0.0",
"eslint": "^4.19.1",
"graphology": "^0.11.4",
"mocha": "^5.2.0"
"eslint": "^6.8.0",
"graphology": "^0.15.1",
"mocha": "^7.0.1"
},

@@ -50,6 +50,6 @@ "eslintConfig": {

"dependencies": {
"graphology-utils": "^1.3.0",
"xmldom": "^0.1.27",
"graphology-utils": "^1.5.0",
"xmldom": "^0.2.1",
"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