Turning titles into URL-safe slugs consistently across your app.
Overview
Turn any text into a clean, SEO-friendly URL slug — transliterates diacritics, collapses separators, truncates on word boundaries, and guarantees uniqueness against an existing set.
Install
$ npm install @lacspace/slugify
Quick example
@lacspace/slugifyts
slugify("Héllo, World! — 2026")
Returns "hello-world-2026"
Tips
Use the same slugify on write and on lookup so URLs always match.
Zero-dependency and isomorphic — safe to import on the server, in the browser, on the edge and in React Native. It tree-shakes, so you only ship what you import.
Looking for the complete API and more examples? The npm page and GitHub README carry the full reference — or grab the PDF.