DefaultSlugStrategy
The default strategy for generating slugs. This strategy:
- Converts to lowercase
- Replaces spaces and special characters with hyphens
- Removes non-alphanumeric characters (except hyphens)
- Removes leading and trailing hyphens
- Collapses multiple hyphens into one
Example
- Implements:
SlugStrategy
generate
method
(ctx: RequestContext, params: SlugGenerateParams) => stringWas this chapter helpful?