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

Readme and code identifies PascalCase as camelCase #72

Open
prestwich opened this issue Nov 18, 2021 · 4 comments
Open

Readme and code identifies PascalCase as camelCase #72

prestwich opened this issue Nov 18, 2021 · 4 comments

Comments

@prestwich
Copy link

readme uses an initial capital in "CamelCase", while camel case is typically understood to not capitalize the initial letter

Reading the code it appears that $var:camel modifier converts to PascalCase rather than camelCase

@ishitatsuyuki
Copy link

I'm currently in need of an actual camelCase modifier to generate JSON names (with stringify!), and I wonder if it's better to go down the path of doing a breaking change rename, or paste will simply never support camelCase as it's rarely used in Rust code and the breaking change is too confusing. @dtolnay thoughts?

@ishitatsuyuki
Copy link

On second thought, I think putting the new option as lower_camel is also a possibility, while the existing one can be optionally aliased to upper_camel for clarity.

@kevinheavey
Copy link

I've published a hacky fork that uses lower camel case: https://crates.io/crates/camelpaste

I won't be maintaining it though so consume at your own risk

@prestwich
Copy link
Author

prestwich commented Jul 3, 2022

I also published a fork using convert_case under the name affix. wanted to completely outsource the casing logic 😅

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