1.2.1 • Published 6 years ago

sluggr v1.2.1

Weekly downloads
10
License
MIT
Repository
github
Last release
6 years ago

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:-ô"
1.2.1

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago