pub fn to_valid_ident(name: &str) -> String
Converts a string to a valid JavaScript identifier by replacing invalid characters with underscores.