Slugify is an Ash module that allows you to convert strings into slugs.
You're going to have to install Ash to use this module.
After you have Ash installed, run either one of these two commands depending on your git clone preference:
ash apm:install https://github.com/ash-shell/slugify.gitash apm:install [email protected]:ash-shell/slugify.git
You can optionally install this globally by adding --global to the end of the command.
You can either call Slugify straight from the command line, or as an imported library.
Check out the HELP.txt file for command line usage. You can also run ash slugify:help in the terminal.
Before you can use Slugify in your modules, you must import it:
Ash__import "github.com/ash-shell/slugify"After including this library, you are free to start using it.
The main function available in this library is Slugify__slugify. Here is some example usage:
slug="$(Slugify__slugify "Some String")"
echo "$slug"Will output:
some-stringTests are written using the official test module
You can run tests by running this command, after slugify is installed:
ash test slugify