techtenstein-slug
v1.0.0
Published
Unicode-aware URL slug generator. Tiny client for the Techtenstein Slug API — handles German umlauts, French accents, Spanish tildes, and more.
Downloads
24
Maintainers
Readme
techtenstein-slug
Tiny, zero-dependency client for the Techtenstein Slug API — Unicode-aware URL slug generator that handles German umlauts, French accents, Spanish tildes, and more.
Install
npm i techtenstein-slugUse
import { slugify } from 'techtenstein-slug';
await slugify('Hello World 2026'); // → 'hello-world-2026'
await slugify('München Straße!'); // → 'munchen-strasse'
await slugify('¡Hola España!'); // → 'hola-espana'
await slugify('A very long title...', { max: 20 }); // → 'a-very-long-title'Full response with metadata:
import { slugifyFull } from 'techtenstein-slug';
const r = await slugifyFull('Café résumé');
// { slug: 'cafe-resume', length: 11, input_length: 12, opts: {...}, processing_ms: 1 }Options
| option | default | notes |
|---|---|---|
| max | 60 | max slug length |
| sep | - | separator character |
| lower | true | lowercase output |
| endpoint | https://slug.techtenstein.com | override API URL |
| fetch | globalThis.fetch | custom fetch (Node <18, retry wrappers) |
Rate limit
Free tier: 1000 requests/day per IP. Higher tiers on Gumroad.
License
MIT © Techtenstein
