
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@fmtk/graph
Advanced tools
This library includes some functions for working with graph structures.
A graph is represented by a Map<T, T[]> – i.e. a map that has a key for each vertex, with the value being an array of children. Note that leaf nodes will be present with an empty array of children.
A graph can also be represented by a list of edges ([T, T][]). Each element in the array is a 2-element array with the source as the first element and the target as the second.
Build a Map<T, T[]> from a list of edges ([T, T][]).
function fromEdges<T>(edges: [T, T][]): Map<T, T[]>;
Build a Map<T, T[]> from an existing arbitrary graph structure.
function fromNodes<T>(root: T, getChildren: (node: T) => T[]): Map<T, T[]>;
Get an array of leaf nodes (nodes with no children) from the given graph.
function getLeaves<T>(graph: Map<T, T[]>): T[];
Returns true if the graph contains a cycle reachable from the given node.
function hasCycles<T>(graph: Map<T, T[]>, from: T): boolean;
Build a list of edges ([T, T][]) from a graph map (Map<T, T[]>).
function toEdges<T>(graph: Map<T, T[]>): [T, T][];
Build a list of all nodes, sorted in an order such that for any given node, all nodes which point to that node come first in the list.
function topologicalSort<T>(graph: Map<T, T[]>): T[];
FAQs
Library for graph structures
The npm package @fmtk/graph receives a total of 1 weekly downloads. As such, @fmtk/graph popularity was classified as not popular.
We found that @fmtk/graph demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.