Skip to content

Commit

Permalink
Merge pull request #1 from stwlam/patch-1
Browse files Browse the repository at this point in the history
Shorten implementation of `capitalize`
  • Loading branch information
esheyw authored Jan 30, 2024
2 parents 34e13c6 + e7c641d commit e3bc878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/helpers/stringHelpers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function prependIndefiniteArticle(string) {
}

export function capitalize(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
return string.capitalize();
}

export function localize(str, data = {}, { defaultEmpty = true } = {}) {
Expand Down

0 comments on commit e3bc878

Please sign in to comment.