slugify-cli
Version:
Slugify a string
35 lines (24 loc) • 717 B
Markdown
> Slugify a string
```
$ npm install --global slugify-cli
```
```
$ slugify --help
Usage
$ slugify <string>
Options
--separator=<string> Word separator [Default: -]
--no-lowercase Don’t make the slug lowercase
--no-decamelize Don’t convert camelCase to separate words
--preserve-leading-underscore If your string starts with an underscore, it will be preserved in the slugified string
Examples
$ slugify 'Déjà Vu!'
deja-vu
$ slugify 'Unicorns & Rainbows' --separator='_'
unicorns_and_rainbows
```
- [slugify](https://github.com/sindresorhus/slugify) - API for this module