1.0.0 • Published 5 years ago

slug-gen v1.0.0

Weekly downloads
67
License
MIT
Repository
github
Last release
5 years ago

Slug Generator

Zero dependency slug generator for the browser and Node.js with unicode support.

Build Status npm npm bundle size NPM

The library is written in TypeScript and provides typings, no need to install them separately.

Usage

import { slug } from "slug-gen";

console.log(slug("ĀāĂ ă Ą ą Ć ć Ĉ ĉ ĊċČčĎ"));
// -> aaa-a-a-a-c-c-c-c-ccccd

Current unicode support

Block rangeBlock name
U+0000..U+007FBasic Latin
U+0080..U+00FFLatin-1 Supplement
U+0100..U+017FLatin Extended-A
U+0180..U+024FLatin Extended-B
U+0370..U+03FFGreek and Coptic
U+0400..U+04FFCyrillic
U+0500..U+052FCyrillic Supplement