
Product
Introducing Supply Chain Attack Campaigns Tracking in the Socket Dashboard
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.
Content addressable graph where every node has at most a single link to another node
Content addressable graph where every node has at most a single link to another node
npm install subgraph
var subgraph = require('subgraph')
var sg = subgraph(levelupInstance)
var ws = sg.createAppendStream()
ws.write('hello')
ws.write('world')
ws.end(function () {
var rs = sg.createReadStream(ws.key)
rs.on('data', function (node) {
console.log(node) // first {value: 'world'} then {value: 'hello'}
})
})
var sg = subgraph(levelupInstance)Create a new subgraph instance
var ws = sg.createAppendStream([link])Create an append stream. The values you write to it will be linked together.
When the stream emits finish it will have a .key property that contains the latest link
and a .length property that contains the number of nodes written
Optionally you can provide a link in the constructor for the first node to append to.
var rs = sg.createReadStream(link)Create a read stream from a link. Will read out values in reverse order of writes to the append stream.
var ws = sg.createWriteStream(link)Create a write stream from a link. Will verify that the values written matches the link when hashed.
sg.add(link, value, [cb])Shorthand for only adding a single value
sg.get(link, cb)Shorthand for getting a single value
sg.resumable(link, cb)If the write stream is destroyed/ended before all values are written to it will be resumable. This method returns the latest missing link of a write stream.
MIT
FAQs
Content addressable graph where every node has at most a single link to another node
The npm package subgraph receives a total of 2 weekly downloads. As such, subgraph popularity was classified as not popular.
We found that subgraph demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Security News
Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.