Skip to content

Commit 127205e

Browse files
committed
chore: update
1 parent 6ff2a26 commit 127205e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ export function titleCase<
186186
>(str?: T, opts?: UserCaseOptions) {
187187
return (Array.isArray(str) ? str : splitByCase(str as string))
188188
.filter(Boolean)
189-
.map((p, i) =>
190-
i && titleCaseExceptions.test(p)
189+
.map((p, index) =>
190+
index > 0 && titleCaseExceptions.test(p)
191191
? p.toLowerCase()
192192
: upperFirst(opts?.normalize ? p.toLowerCase() : p),
193193
)

0 commit comments

Comments
 (0)