graphology-gexf
Advanced tools
Comparing version 0.13.1 to 0.13.2
@@ -191,2 +191,9 @@ /* eslint no-self-compare: 0 */ | ||
function inferValueType(value) { | ||
// NOTE: at some point we might need a frame-independent test for this... | ||
// NOTE: it would be nice not to have to reallocate the Set as an Array | ||
// but good enough for the time being. | ||
if (value instanceof Set) { | ||
value = Array.from(value); | ||
} | ||
if (Array.isArray(value)) { | ||
@@ -232,3 +239,4 @@ var type = inferListValueType(value); | ||
if (type.startsWith('list')) { | ||
value = Array.isArray(value) ? value : [value]; | ||
if (value instanceof Set) value = Array.from(value); | ||
var arrayValue = Array.isArray(value) ? value : [value]; | ||
@@ -239,3 +247,3 @@ var subtype = type.slice(4); | ||
'[' + | ||
value | ||
arrayValue | ||
.map(function (v) { | ||
@@ -248,3 +256,3 @@ return serializeValue(subtype, v); | ||
} else { | ||
return value.join('|'); | ||
return arrayValue.join('|'); | ||
} | ||
@@ -251,0 +259,0 @@ } |
{ | ||
"name": "graphology-gexf", | ||
"version": "0.13.1", | ||
"version": "0.13.2", | ||
"description": "GEXF parser & writer for graphology.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41083
1135