We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ff2a26 commit 127205eCopy full SHA for 127205e
src/index.ts
@@ -186,8 +186,8 @@ export function titleCase<
186
>(str?: T, opts?: UserCaseOptions) {
187
return (Array.isArray(str) ? str : splitByCase(str as string))
188
.filter(Boolean)
189
- .map((p, i) =>
190
- i && titleCaseExceptions.test(p)
+ .map((p, index) =>
+ index > 0 && titleCaseExceptions.test(p)
191
? p.toLowerCase()
192
: upperFirst(opts?.normalize ? p.toLowerCase() : p),
193
)
0 commit comments