Cassie
A simple cli utility to change the case style in your document. It supports several languages
Usage
go run main.go <file-name> <options>
Compile
go build -o cassie
Example
go run main.go test_assets/camel.js cs
class user_account_test {
constructor(user_name, user_email) {
this.user_name = user_name;
this.user_email = user_email;
this.is_logged_in = false;
}
log_in() {
this.is_logged_in = true;
console.log(`${this.user_name} has logged in.`);
}
log_out() {
this.is_logged_in = false;
console.log(`${this.user_name} has logged out.`);
}
get_user_info() {
return {
name: this.user_name,
email: this.user_email,
status: this.is_logged_in ? "online" : "offline"
};
}
}
Options
It's very simple, it uses BSD-like syntax
ps [from pascal to snake]
There are three options
p : PascalCase
s : snake_case
c : camelCase
Languages
The program will detect the language of the input file, and perform a case conversion
Warning:
If you are using standard or other libraries they'll be changed as well.
std::for_each(..)
will become
std::forEach(..)
So, make sure you are changing the case to the one most appropriate for your language.