0.0.4 • Published 2 years ago
@magic-libraries/slugify v0.0.4
@magic-libraries/slugify
@magic-client library.
@magic-libraries/slugify turns strings into url safe strings. opinionated.
installation
npm install --save-exact @magic-libraries/slugify
usage
in a page/component, just use the lib.slugify function
#usage- slugify
lib.slugify('UpperCase @#$ test')
// 'uppercasetest'
#usage- slugify add dash
replace whitespaces and invalid characters with a single dash by passing true as second argument to slugify
lib.slugify('UpperCase @#$ test', true)
// 'uppercase-test'
source
the source for this page is in the example directory and gets built and published to github using @magic/core
changelog
0.0.1
first release
0.0.2
bump required node version to 14.15.4
0.0.3
update dependencies
0.0.4
- use an object instead of strings to replace chars, allowing multi-character replacements.
- update dependencies
0.0.5 - unreleased
...