@miikkaylisiurunen/slugi
v0.0.2
Published
Command-line tool to transform strings into web-friendly slugs
Readme
Slugi
Simple and configurable command-line tool to transform strings into web-friendly slugs
Installation
Install Slugi globally using npm:
npm install -g @miikkaylisiurunen/slugiUsage
After installation, you can use the slugi command:
slugi <string> [options]Options
-r, --replacement: Replacement character for disallowed characters in the slug. Default:-.-l, --lowercase: Converts the slug to lowercase. Default:false.-h, --help: Displays help.-v, --version: Displays the version.
For example, to generate a slug with a custom replacement character and in lowercase, you can use:
slugi "Hello World" -r "_" -l
# Output: hello_worldExamples
Transform a string into a slug with default options:
slugi "Hello World"
# Output: Hello-WorldTransform a string with custom replacements and convert it to lowercase:
slugi "Hello World" -r "_" -l
# Output: hello_worldShow the help message:
slugi --helpShow the version:
slugi --version