Skip to content

@magic-libraries/slugift turns strings into url safe strings. opinionated.

License

Notifications You must be signed in to change notification settings

magic-libraries/slugify

Repository files navigation

@magic-libraries/slugify

@magic-client library.

@magic-libraries/slugify turns strings into url safe strings. opinionated.

html-docs

NPM version Linux Build Status Windows Build Status Coverage Status Known Vulnerabilities

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

...

About

@magic-libraries/slugift turns strings into url safe strings. opinionated.

Resources

License

Stars

Watchers

Forks

Packages

No packages published