
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.
word-ngrams
Advanced tools
####Getting Started Install package with:
npm install word-ngrams
####Features:
buildNGrams(“Hello, World! How’s the world weather today? Hello, World!”, 2, {caseSensitive: true, includePunctuation: true})
// returns { Hello: { ,: 2 },
,: { World: 2 },
World: { !: 2 },
!: { How’s: 1, null: 1},
How’s: { the: 1 },
the: { world: 1 },
world: { weather: 1 },
weather: { today: 1 },
today: { ?: 1 },
?: { Hello: 1 }
}
// Example input nGram for “Hello World. Goodbye World!”, without punctuation
listAllNGrams({ Hello: { World: 1 }, Goodbye: { world: 1 }})
// returns [“hello world”, “goodbye world”]
// Example input nGram for “Hello World”, without punctuation
getNGramsByFrequency({ hello: { world: 1 }, 1)
// returns [ “hello world”]
// Example input nGram for “Hello World! Goodbye World!”, with punctuation
getMostCommonNGrams({ Hello: { World: 1 }, World: { !: 2 }, !: { Goodbye: 1, null: 1 }, Goodbye: { world: 1 }})
// returns [“World!”]
// Example input for “Hello, World! How’s the weather? Goodbye, World!”
listNGramsByCount({ hello: 1, world: 2, “how’s”: 1, the: 1, weather: 1, goodbye: 1})
// returns { 1: [“hello”, “how’s”, “the”, “weather”, “goodbye”], 2: [“world”]}
View the full specs and check out more text analysis in my Text Analysis Suite.
FAQs
A package for building and analyzing word nGrams
The npm package word-ngrams receives a total of 74 weekly downloads. As such, word-ngrams popularity was classified as not popular.
We found that word-ngrams 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.