graph-data-structure
Advanced tools
Comparing version 1.7.0 to 1.8.0
@@ -315,3 +315,4 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.GraphDataStructure = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){ | ||
source: source, | ||
target: target | ||
target: target, | ||
weight: getEdgeWeight(source, target) | ||
}); | ||
@@ -327,3 +328,3 @@ }); | ||
serialized.nodes.forEach(function (node){ addNode(node.id); }); | ||
serialized.links.forEach(function (link){ addEdge(link.source, link.target); }); | ||
serialized.links.forEach(function (link){ addEdge(link.source, link.target, link.weight); }); | ||
return graph; | ||
@@ -336,2 +337,2 @@ } | ||
},{}]},{},[1])(1) | ||
}); | ||
}); |
@@ -314,3 +314,4 @@ // A graph data structure with depth-first search and topological sort. | ||
source: source, | ||
target: target | ||
target: target, | ||
weight: getEdgeWeight(source, target) | ||
}); | ||
@@ -326,3 +327,3 @@ }); | ||
serialized.nodes.forEach(function (node){ addNode(node.id); }); | ||
serialized.links.forEach(function (link){ addEdge(link.source, link.target); }); | ||
serialized.links.forEach(function (link){ addEdge(link.source, link.target, link.weight); }); | ||
return graph; | ||
@@ -329,0 +330,0 @@ } |
{ | ||
"name": "graph-data-structure", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"description": "A graph data structure with topological sort.", | ||
@@ -30,3 +30,2 @@ "main": "index.js", | ||
"devDependencies": { | ||
"browserify": "^16.1.1", | ||
"graph-diagrams": "^0.5.0", | ||
@@ -33,0 +32,0 @@ "mocha": "^3.5.0" |
@@ -169,2 +169,3 @@ # graph-data-structure | ||
* `target` The node identifier string of the target node (**v**). | ||
* `weight` The weight of the edge between the source and target nodes. | ||
@@ -190,4 +191,4 @@ Here's example code for serializing a graph. | ||
"links": [ | ||
{ "source": "a", "target": "b" }, | ||
{ "source": "b", "target": "c" } | ||
{ "source": "a", "target": "b", "weight": 1 }, | ||
{ "source": "b", "target": "c", "weight": 1 } | ||
] | ||
@@ -194,0 +195,0 @@ } |
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
31178
2
575
229