Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants