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

gremlin-graphviz

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gremlin-graphviz - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

28

lib/index.js

@@ -77,9 +77,23 @@ // lib/index.js

// ## Non-mutatingmethods
// All of the useful non-mutating methods are exported.
['getNode',
'edgeCount',
'nodeCount',
'output',
'to_dot'
// ## Methods
// All of the useful methods are exported.
[
'addCluster',
'addEdge',
'addNode',
'clusterCount',
'edgeCount',
'get',
'getCluster',
'getEdgeAttribut',
'getNode',
'getNodeAttribut',
'nodeCount',
'output',
'render',
'set',
'setEdgeAttribut',
'setGraphVizPath',
'setNodeAttribut',
'to_dot'
].map(haulMethod);

@@ -86,0 +100,0 @@

{
"name": "gremlin-graphviz",
"version": "1.0.4",
"version": "1.0.5",
"description": "Use Graphviz to visualize Gremlin graphs.",

@@ -36,3 +36,3 @@ "main": "lib/index.js",

"docco": "^0.6.3",
"gremlin-v3": "0.0.5",
"gremlin-v3": ">=0.0.20",
"heredoc": "^1.2.0",

@@ -39,0 +39,0 @@ "jshint": "^2.5.10",

@@ -242,2 +242,41 @@ // test/test.js

it ('allows graph properties to be set/get', function () {
return gremlinGraphviz(graph)
.then(function (g) {
// Set a valid graph property that should appear in the DOT. The valid set of properties are validated by
// Graphviz at runtime.
g.set('splines', true);
expect(g.get('splines')).to.equal(true);
expect(g.to_dot()).to.contain('splines = "true"');
});
});
it ('allows global node properties to be set/get', function () {
return gremlinGraphviz(graph)
.then(function (g) {
g.setNodeAttribut('color', 'blue');
expect(g.getNodeAttribut('color')).to.equal('blue');
expect(g.to_dot()).to.contain('node [ color = "blue" ]');
});
});
it ('allows global edge properties to be set/get', function () {
return gremlinGraphviz(graph)
.then(function (g) {
g.setEdgeAttribut('color', 'blue');
expect(g.getEdgeAttribut('color')).to.equal('blue');
expect(g.to_dot()).to.contain('edge [ color = "blue" ]');
});
});
it ('allows individual node properties to be set/get', function () {
return gremlinGraphviz(graph)
.then(function (g) {
var node1 = g.getNode('1');
node1.set('color', 'blue');
expect(node1.get('color')).to.equal('blue');
expect(g.to_dot()).to.contain('"1" [ color = "blue" ]');
});
});
});

@@ -244,0 +283,0 @@

Sorry, the diff of this file is not supported yet

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