{"id":13503071,"url":"https://github.com/jordy25519/casey","last_synced_at":"2025-04-05T17:03:42.194Z","repository":{"id":37935680,"uuid":"184374238","full_name":"jordy25519/casey","owner":"jordy25519","description":"Case transforming macros for idents","archived":false,"fork":false,"pushed_at":"2024-12-28T03:10:51.000Z","size":37,"stargazers_count":39,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T16:03:28.800Z","etag":null,"topics":["case-transforming-macros","macros","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jordy25519.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-01T05:43:18.000Z","updated_at":"2025-03-10T16:10:47.000Z","dependencies_parsed_at":"2024-01-18T23:26:57.985Z","dependency_job_id":"7a3ad7f6-5efe-4eed-8e6b-f858da82f75a","html_url":"https://github.com/jordy25519/casey","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordy25519%2Fcasey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordy25519%2Fcasey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordy25519%2Fcasey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordy25519%2Fcasey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jordy25519","download_url":"https://codeload.github.com/jordy25519/casey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369953,"owners_count":20927928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["case-transforming-macros","macros","rust"],"created_at":"2024-07-31T22:02:35.694Z","updated_at":"2025-04-05T17:03:42.145Z","avatar_url":"https://github.com/jordy25519.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Casey\n\n[![Build](https://github.com/jordy25519/casey/actions/workflows/build.yml/badge.svg)](https://github.com/jordy25519/casey/actions/workflows/build.yml)  \n\nCase transforming macros  \n\nCasey transforms the case of given input `ident`s.  \nNiche but maybe useful in other macros.  \n```rust\nuse casey::{pascal, lower, shouty, snake, upper};\n\nlower!(ABC);    // renders: `abc`\nupper!(abc);    // `ABC`\nsnake!(ABC);    // `a_b_c`\npascal!(ab_c);  // `AbC`\nshouty!(a_b_c); // `A_B_C`\n```\n\n## Token Stream\nCasey macros can operate on `TokenStream`s e.g.  \n```rust\n    snake!(\n        #[derive(PartialEq)]\n        struct MockStruct {}\n        impl MockStruct {\n            fn test() -\u003e bool { true }\n        }\n    );\n    assert!(mock_struct::test());\n    assert!(mock_struct::test() == mock_struct::test())\n```\nAll `ident` tokens in the stream will have the case transformation applied (keywords and attribute macros will be ignored).  \n\n### Gotchas\nType names, including built-in types are not considered keywords e.g. `bool`, `usize`, `i32` etc. and **will** be transformed by casey.  \n```rust\npascal!(let test: bool = true); // renders: `let Test: Bool = true;`\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordy25519%2Fcasey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjordy25519%2Fcasey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordy25519%2Fcasey/lists"}