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