recase icon indicating copy to clipboard operation
recase copied to clipboard

You cannot circularly convert camel to snake

Open srevenant opened this issue 5 years ago • 0 comments

I came here because Macro has the same problem, and it's frustrating with how it's used inside Absinthe but isn't circular. I was hoping to find another lib that did it right, but...alas, this lib has the same broken functionality when you have acronyms with mulitiple cases in a row:

iex> "power1VA" |> Recase.to_snake |> Recase.to_camel "power1Va"

What I'd expect is Recase.to_snake converts it to "power1_v_a"

Is this something this library would like to fix? I can look into the code if so.

srevenant avatar Nov 09 '20 15:11 srevenant