Question
What configuration options does the slugify function accept?
About sindresorhus/slugify ยท 2 messages ยท last activity 6/15/2026
What configuration options does the slugify function accept?
The slugify function accepts an options object with the following configuration options:
separator [index.d.ts:L1-L15]
string'-'lowercase [index.d.ts:L26-L30]
booleantruefalse)decamelize [index.d.ts:L33-L42]
booleantruefooBar โ foo bar)customReplacements [index.d.ts:L51-L71]
Array<string[]>[['&', ' and '], ['๐ฆ', ' unicorn '], ['โฅ', ' love ']]preserveLeadingUnderscore [readme.md, mentioned in the excerpt]
booleanfalsepreserveTrailingDash [readme.md:L176-L205]
booleanfalsepreserveCharacters [readme.md:L176-L205]
string[][]FOLLOW_UPS:
Want to ask your own question?
Open chat for sindresorhus/slugify โPublic Q&A. Generated by RepoPilot from the actual source of sindresorhus/slugify. AI answers can be incomplete or stale โ verify before relying on them.