Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pascal case broken when string ends with 1 number and 1 letter. #107

Closed
mpicard opened this issue Apr 12, 2023 · 2 comments
Closed

pascal case broken when string ends with 1 number and 1 letter. #107

mpicard opened this issue Apr 12, 2023 · 2 comments

Comments

@mpicard
Copy link

mpicard commented Apr 12, 2023

Reproduction

camelcase("a1b", { pascalCase: true });

Current Behaviour

"A1b"

Expected Behaviour

"A1B"
@skavigitp
Copy link
Contributor

Ran a test for the above scenario and the test passed without errors.
✔ pascal case broken with number
test('pascal case broken with number ', t => {
t.is(camelCase('a1b', {pascalCase: true}), 'A1B');
});

@daniel-quinn-c1
Copy link

Ran a test for the above scenario and the test passed without errors. ✔ pascal case broken with number test('pascal case broken with number ', t => { t.is(camelCase('a1b', {pascalCase: true}), 'A1B'); });

I also ran a few tests trying to break the functionality, but everything seems to work as it should. Even tried using double quotes as shown in the example, not that those should matter. Should this issue be closed?

✔️ Issue 107
test('Issue 107', t => {
/* eslint-disable-next-line quotes */
t.is(camelCase("a1b", {pascalCase: true}), "A1B");
t.is(camelCase('a1b2c3', {pascalCase: true}), 'A1B2C3');
t.is(camelCase('the1quick2brown3fox4jumped5over6the7lazy8red9dog10a', {pascalCase: true}), 'The1Quick2Brown3Fox4Jumped5Over6The7Lazy8Red9Dog10A');
t.is(camelCase('the1quick2brown_3fox4jumped5over6The7lazy8red9dog10a', {pascalCase: true}), 'The1Quick2Brown3Fox4Jumped5Over6The7Lazy8Red9Dog10A');
});

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

No branches or pull requests

3 participants