
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
graphlib-json-graph
Advanced tools
Converts json-graph definitions into graphlib graphs.
npm install --save graphlib-json-graph
var toGraph = require("graphlib-json-graph");
var graphDefinition = {
graph: {
label: "Example graph",
nodes: [{
id: "1"
}, {
id: "2"
}],
edges: [{
id: "e1",
directed: true,
source: "1",
target: "2"
}]
}
};
var graph = toGraph(graphDefinition);
graph.nodes(); // ["1", "2"]
graph.edges(); // {v: "1", w: "2"}
The module exports one function: toGraph(graphDefinition).
graphDefinition is supposed to be an object that conforms with the json graph specification.
The function returns either one, or a list of graphlib graphs.
The distinction is based on whether you have a graphs property or a graph property.
multigraph by default to support multiple edges that point to the same nodesid property for them so that you can differentiate them by namelabels for the nodes and edges in the graph are set to the objects in the definition JSONIs based on mochajs
npm installnpm testFeel free to raise an issue or submit a pull request
In terms of styling, please use tabs for indentation
FAQs
Converts json-graph definitions into graphlib graphs.
The npm package graphlib-json-graph receives a total of 2 weekly downloads. As such, graphlib-json-graph popularity was classified as not popular.
We found that graphlib-json-graph 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.