Skip to content

Interface: SlugifyOptions

Defined in: utils/string/slugify.ts:6

Options for slugify.

Properties

lower?

optional lower: boolean

Defined in: utils/string/slugify.ts:12

Whether to transform the slug to lower case.

Defaults to true.


separator?

optional separator: string

Defined in: utils/string/slugify.ts:19

Separator to use between slug tokens.

Defaults to "-".


trimSeparator?

optional trimSeparator: boolean

Defined in: utils/string/slugify.ts:26

Whether to trim repeated separators at the start and end.

Defaults to true.


maxLength?

optional maxLength: number

Defined in: utils/string/slugify.ts:34

Optional maximum length (in characters) for the slug.

When provided, the slug string is truncated to this length and then trimmed from leading/trailing separators if trimSeparator is true.

Released under the MIT License.