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

ngraph.graph

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngraph.graph - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

8

index.js

@@ -20,3 +20,3 @@ /**

var nodes = {},
var nodes = typeof Object.create === 'function' ? Object.create(null) : {},
links = [],

@@ -264,6 +264,4 @@ // Hash of multi-edges. Used to track ids of edges between same nodes

for (node in nodes) {
if (nodes.hasOwnProperty(node)) {
if (callback(nodes[node])) {
return; // client doesn't want to proceed. return.
}
if (callback(nodes[node])) {
return; // client doesn't want to proceed. return.
}

@@ -270,0 +268,0 @@ }

{
"name": "ngraph.graph",
"version": "0.0.2",
"version": "0.0.3",
"description": "Base graph structure in ngraph.*",

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

ngraph.graph
============
[Graph](http://en.wikipedia.org/wiki/Graph_(mathematics\)) data structure for ngraph.\*. Library implements API to modify graph structure and supports event-driven notifications when graph changes.
[Graph](http://en.wikipedia.org/wiki/Graph_\(mathematics\)) data structure for ngraph.\*. Library implements API to modify graph structure and supports event-driven notifications when graph changes.

@@ -6,0 +6,0 @@ [![build status](https://secure.travis-ci.org/anvaka/ngraph.graph.png)](http://travis-ci.org/anvaka/ngraph.graph)

@@ -17,2 +17,17 @@ var test = require('tap').test,

test('add nodeid same as a prototype property', function (t) {
var graph = createGraph();
graph.addNode('constructor');
graph.addLink('watch', 'constructor');
var iterated = 0;
graph.forEachNode(function () {
iterated += 1;
});
t.ok(graph.hasLink('watch', 'constructor'));
t.equal(iterated, 2, 'has two nodes');
t.end();
});
test('add link adds link', function(t) {

@@ -19,0 +34,0 @@ var graph = createGraph();

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