Skip to content

ash-shell/slugify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slugify

Build Status

Slugify is an Ash module that allows you to convert strings into slugs.

Getting started

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.git
  • ash apm:install [email protected]:ash-shell/slugify.git

You can optionally install this globally by adding --global to the end of the command.

Usage

You can either call Slugify straight from the command line, or as an imported library.

Command Line Usage

Check out the HELP.txt file for command line usage. You can also run ash slugify:help in the terminal.

Imported Library Usage

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.

Slugify__slugify

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-string

Running Tests

Tests are written using the official test module

You can run tests by running this command, after slugify is installed:

ash test slugify

License

MIT

About

🐌 Convert those pesky strings into slugs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages