Skip to content

Fix case conversion boundaries and Unicode handling - #635

Closed
nev21 with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-case-helpers-normalization
Closed

nev21 with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-case-helpers-normalization

Conversation

Copilot AI commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Case helpers retained inconsistent casing, dropped non-ASCII letters, and produced dangling separators.

  • Word conversion: Normalize casing and share boundary rules across camel, kebab, and snake case.
  • Unicode: Preserve Unicode letters, numbers, and combining marks, with an approximate fallback for older engines.
  • Capitalization: Preserve separators and document that existing camel-case boundaries are lowercased.
  • Compatibility: Document output changes in the changelog.
strCamelCase("café crème");       // "caféCrème"
strKebabCase("XMLHttpRequest");   // "xml-http-request"
strSnakeCase("__hello_world__");  // "hello_world"

Copilot AI and others added 2 commits November 6, 2026 05:40
Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix case helpers for normalization of word boundaries Fix case conversion boundaries and Unicode handling Nov 6, 2026
Copilot AI requested a review from nev21 November 6, 2026 05:45
Comment thread lib/src/string/conversion.ts Outdated
}
return (upperPrefix || EMPTY) + newPrefix + convertMatch;
});
let words = _words(asString(value));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot I want this to occur as a single pass and not create a words array and then process that array

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to convert and append each word during the boundary scan, without an intermediate array, in 67a8f3d.

Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Copilot AI requested a review from nev21 November 7, 2026 06:36
@nev21 nev21 closed this Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants