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.3.0 to 0.3.1

2

common/helpers.js

@@ -36,2 +36,2 @@ /**

return value;
}
};

@@ -24,12 +24,12 @@ /**

var VALID_GEXF_TYPES = new Set([
'integer',
'long',
'double',
'float',
'boolean',
'liststring',
'string',
'anyURI'
]);
// var VALID_GEXF_TYPES = new Set([
// 'integer',
// 'long',
// 'double',
// 'float',
// 'boolean',
// 'liststring',
// 'string',
// 'anyURI'
// ]);

@@ -123,4 +123,4 @@ var VIZ_RESERVED_NAMES = new Set([

const DEFAULT_NODE_REDUCER = DEFAULT_ELEMENT_REDUCER.bind(null, 'node'),
DEFAULT_EDGE_REDUCER = DEFAULT_ELEMENT_REDUCER.bind(null, 'edge');
var DEFAULT_NODE_REDUCER = DEFAULT_ELEMENT_REDUCER.bind(null, 'node'),
DEFAULT_EDGE_REDUCER = DEFAULT_ELEMENT_REDUCER.bind(null, 'edge');

@@ -169,2 +169,15 @@ /**

/**
* Function used to cast the given value into the given type.
*
* @param {string} type - Target type.
* @param {any} value - Value to cast.
* @return {string}
*/
function cast(type, value) {
if (type === 'liststring' && Array.isArray(value))
return value.join('|');
return '' + value;
}
/**
* Function used to collect data from a graph's nodes.

@@ -388,15 +401,2 @@ *

/**
* Function used to cast the given value into the given type.
*
* @param {string} type - Target type.
* @param {any} value - Value to cast.
* @return {string}
*/
function cast(type, value) {
if (type === 'liststring' && Array.isArray(value))
return value.join('|');
return '' + value;
}
/**
* Function taking a graphology instance & outputting a gexf string.

@@ -410,3 +410,3 @@ *

*/
module.exports = function writer(graph, options) {
module.exports = function write(graph, options) {
if (!isGraph(graph))

@@ -436,3 +436,3 @@ throw new Error('graphology-gexf/writer: invalid graphology instance.');

for (k in graphAttributes) {
for (var k in graphAttributes) {
if (k !== 'lastModifiedDate')

@@ -439,0 +439,0 @@ writer.writeElement(k, graphAttributes[k]);

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

@@ -13,3 +13,3 @@ "main": "index.js",

"scripts": {
"lint": "eslint *.js browser/**/*.js node/**/*.js",
"lint": "eslint ./**/*.js",
"test:browser": "mocha ./test/browser/endpoint.js",

@@ -44,3 +44,6 @@ "test": "npm run test:browser"

"eslintConfig": {
"extends": "@yomguithereal/eslint-config"
"extends": "@yomguithereal/eslint-config",
"globals": {
"Set": true
}
},

@@ -47,0 +50,0 @@ "dependencies": {

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