Skip to content

Ayc0/sluggr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sluggr

JS light slugger 875 B (gzipped: 495 B)

How to use

const sluggr = require('sluggr');

// sluggr(char = "_", whitelist = "", shouldNormalize = true)
const slugger = sluggr("-", ":;");

> slugger("WDAè: ô*")
"wdae:-o"

shouldNormalize

If shouldNormalize is set to false, sluggr will no longer replace é by e etc. and those characters will be considered as whitespaces, so you'll have to set them in the whitelist string

const sluggr = require('sluggr');

const slugger = sluggr("-", "ô", false);

> slugger("WDAè: ô*")
"wda:-ô"

About

JS light slugger 875 B (gzipped: 495 B)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published