Skip to content

feat(micro-utilities): add titleize to replacements - #1262

Merged
43081j merged 2 commits into
e18e:mainfrom
maksimgm:feat/titleize
Nov 20, 2026
Merged

43081j merged 2 commits into
e18e:mainfrom
maksimgm:feat/titleize

Conversation

@maksimgm

Copy link
Copy Markdown
Contributor

🔗 Linked issue

closes #1189

📚 Description

adds titleize (~3.1M weekly downloads) to micro-utilities with a new snippet::title-case, the one-liner from the issue:

const titleCase = (str) => str.toLowerCase().replace(/(?:^|[\s-])\S/g, (m) => m.toUpperCase())

every version of the package uses this same regex. checked against 1.0.0, 3.0.0 and 4.0.0 with mixed case, hyphens, tabs/newlines, extra spaces, apostrophes and accented letters, same output. the package also throws on non-strings

43081j
43081j previously approved these changes Nov 20, 2026
@43081j
43081j merged commit 5c098e3 into e18e:main Nov 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Replacement]: titleize

2 participants