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

@tangle/graph

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tangle/graph - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

2

index.js

@@ -24,3 +24,3 @@ const { LinkMap, BacklinkMap } = require('./maps')

.map(node => node.key)
if (this.rootKeys.length === 0) error('at least one root node')
if (this.nodes.length && this.rootKeys.length === 0) error('at least one root node')

@@ -27,0 +27,0 @@ if (containsSelfLoop(this.nodes, this._getBacklinks)) throw new Error('there is a selfloop in nodes')

{
"name": "@tangle/graph",
"version": "2.0.0",
"version": "2.1.0",
"description": "a helper for building + updating traverseable tangle graphs",

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

const test = require('tape')
const Graph = require('..')
test('Graph with nodes []', t => {
const graph = new Graph([])
t.true(graph, 'can create graph')
t.deepEqual(graph.rootNodes, [], 'has no rootNodes')
t.deepEqual(graph.rootNodeKeys, [], 'has no rootNodes')
t.end()
})
// A (root)

@@ -5,0 +15,0 @@ // / \

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