
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
hypercore-dag
Advanced tools
DAGs on top of hypercore, allowing verified random-access to graph nodes
hypercore-dagDAGs on top of hypercore, allowing verified random-access to graph nodes
'use strict'
var assert = require('assert')
var hypercore = require('hypercore')
var memdb = require('memdb')
var hypercoreDag = require('.')
var core = hypercore(memdb())
var dag = hypercoreDag(core.createFeed())
// We're building the following graph (Time on x axis, depth on y axis)
// 0 2
// \- 1 \
// \--\-- 3
dag.add(null, 'Root', function (err, ref0) {
assert.ifError(err)
dag.add(ref0, 'Child 1', function (err, ref1) {
assert.ifError(err)
dag.add(null, 'Another root', function (err, ref2) {
assert.ifError(err)
dag.add([ref0, ref1, ref2], 'Tie them', function (err, ref3) {
assert.ifError(err)
dag.get(ref3, function (err, node) {
assert.ifError(err)
assert.deepEqual(node.links, [0, 1, 2])
assert.equal(node.depth, 2)
assert.equal(node.value, 'Tie them')
})
})
})
})
})
hypercoreDag(feed, [opts])opts being {lock: mutexify()}
dag.add(links, value, [callback])dag.get(index, callback)dag.createReadStream([opts])require('hypercore-dag/bfs-stream')(startIndex, [opts])Preform a Breadth-first search
from startIndex
require('hypercore-dag/dfs-stream')(startIndex, [opts])Preform a Depth-first search
from startIndex
npm install hypercore-dag
FAQs
DAGs on top of hypercore, allowing verified random-access to graph nodes
We found that hypercore-dag demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.