Question
What configuration options does the slugify function accept?
About sindresorhus/slugify ยท 2 messages ยท last activity 6/29/2026
What configuration options does the slugify function accept?
The slugify function accepts the following configuration options:
separator [index.d.ts:L1-L18]
string'-'lowercase [index.d.ts:L26-L40]
booleantruedecamelize [index.d.ts:L51-L62]
booleantruefooBar โ foo bar)customReplacements [index.d.ts:L51-L80]
Array<string[]>[['&', ' and '], ['๐ฆ', ' unicorn '], ['โฅ', ' love ']]preserveLeadingUnderscore
booleanfalsepreserveTrailingDash [readme.md:L176-L205]
booleanfalsepreserveCharacters [readme.md:L176-L205]
string[][]All these options are combined in the Options type definition [index.d.ts:L1-L30].
FOLLOW_UPS:
Want to ask your own question?
Open chat for sindresorhus/slugifyPublic Q&A. Generated by RepoPilot from the actual source of sindresorhus/slugify. AI answers can be incomplete or stale โ verify before relying on them.