
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.
wordgraph is a simple implementation of a Directed Acyclic Word Graph in Javascript. wordgraph contains the following features:
In developing this project, the following articles were used as guides for a good chunk of development:
git clone https://www.github.com/petebrown77/wordgraph.git
cd wordgraph
npm install
// Importing it
const { Trie } = require("wordgraph");
// Initialise it and insert words
const new_trie = new Trie();
new_trie.insert("hello");
// Check if trie contains word
console.log(new_trie.contains("hello"); // "true"
console.log(new_trie.contains("marsh"); // "false"
// wordgraph does not consider partials to be a word, "hello" is valid, but not any substring
// "he" would need to be inserted separately for this to return true
console.log(new_trie.contains("he"); // "false"
// Serialize and deserialize
const serialized = new_trie.serialize(); // returns string representation of trie
console.log(serialized.length) // should be about 40-60% reduction in size of data inserted
// now, you can write the string to a file to be loaded later
fs.writeFileSync("./example.dawg", serialized);
// to read a Dawg from a file, simply read the string into Trie.deserialize(<string>);
const deserialized_string = fs.readFileSync("path/to/dawg.txt").toString();
const deserial_trie = Trie.deserialize(deserialized_string);
// Now, the new trie has the same data as the old one
console.log(deserial_trie.contains("hello"); // true
License is MIT
wordgraph is still under active developement, and not everything is documented and working.
FAQs
Directed Acylic Word Graph (DAWG) implementation in Javascript
We found that wordgraph 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.