Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
noootwo committed Nov 22, 2024
1 parent 6ff2a26 commit 127205e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ export function titleCase<
>(str?: T, opts?: UserCaseOptions) {
return (Array.isArray(str) ? str : splitByCase(str as string))
.filter(Boolean)
.map((p, i) =>
i && titleCaseExceptions.test(p)
.map((p, index) =>
index > 0 && titleCaseExceptions.test(p)
? p.toLowerCase()
: upperFirst(opts?.normalize ? p.toLowerCase() : p),
)
Expand Down

0 comments on commit 127205e

Please sign in to comment.