Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@aurelle/idiomatic-slug
Advanced tools
Generates slugs made of an adjective and a noun.
Browser and NodeJS compatible.
import { generate } from '@aurelle/idiomatic-slug'
console.log(generate())
// angry-alarm
console.log(generate({ separator = ' ' }))
// angry alarm
It's also possible to generate a random adjective or noun separately:
import { noun, adjective } from '@aurelle/idiomatic-slug'
console.log(noun())
// alarm
console.log(adjective())
// angry
This package uses local wordlists that, when combined into an adjective-noun slug, make up for a total of 2,910,512 unique slugs. While this may seem huge you want to apply extra care if you rely on this slug as your only source of uniqueness (which I wouldn't recommend).
To keep it simple and fast, the wordlists are loaded in memory as Javascripts arrays. As such, this has little impact on the general memory consumption. While this should not be that big of a deal, especially on systems that have the luxury of running NodeJS, that's worth noting.
FAQs
Generate slugs made of an English adjective and noun.
We found that @aurelle/idiomatic-slug 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.