Zero dependency slug generator for the browser and Node.js with unicode support.
The library is written in TypeScript and provides typings, no need to install them separately.
import { slug } from "slug-gen";
console.log(slug("ĀāĂ ă Ą ą Ć ć Ĉ ĉ ĊċČčĎ"));
// -> aaa-a-a-a-c-c-c-c-ccccd
Block range | Block name |
---|---|
U+0000..U+007F | Basic Latin |
U+0080..U+00FF | Latin-1 Supplement |
U+0100..U+017F | Latin Extended-A |
U+0180..U+024F | Latin Extended-B |
U+0370..U+03FF | Greek and Coptic |
U+0400..U+04FF | Cyrillic |
U+0500..U+052F | Cyrillic Supplement |