SnakeCase hard #template-literal #string

by Gabriel Vergnaud @gvergnaud

Take the Challenge

Create a `SnakeCase` generic that turns a string formatted in **camelCase** into a string formatted in **snake_case**. A few examples: ```ts type res1 = SnakeCase<"hello">; // => "hello" type res2 = SnakeCase<"userName">; // => "user_name" type res3 = SnakeCase<"getElementById">; // => "get_element_by_id" ```
Back Share your Solutions Check out Solutions