57
GitHub - sindresorhus/slugify: Slugify a string
source link: https://github.com/sindresorhus/slugify
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
readme.md
slugify
Slugify a string
Useful for URLs, filenames, and IDs.
Install
$ npm install @sindresorhus/slugify
Usage
const slugify = require('@sindresorhus/slugify'); slugify('I ♥ Dogs'); //=> 'i-love-dogs' slugify(' Déjà Vu! '); //=> 'deja-vu' slugify('fooBar 123 $#%'); //=> 'foo-bar-123'
Related
- filenamify - Convert a string to a valid safe filename
License
MIT © Sindre Sorhus
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK