Type-safe slugs for Elm
Generate a valid slug from a given text.
If a valid slug can be generated it returns just the slug, otherwise nothing is returned.
generate "Some text here" == Just (Slug "some-text-here")
generate "--!@·==)/()" == NothingParse a slug from its string representation.
It returns the slug if the input is a valid slug, otherwise it returns nothing.
parse "some-valid-slug" == Just (Slug "some-valid-slug")
parse "Not a valid slug" == Nothing
parse "another-invalid-slug-" == NothingReturns the string represntation of a slug.
Maybe.map toString (generate "Some text") == Just "some-text"
Represents a slug