recase icon indicating copy to clipboard operation
recase copied to clipboard

Handle atom inputs

Open lustrousgorilla opened this issue 5 years ago • 3 comments

What do you think about also handling atom inputs? I'm happy to make a PR to implement this enhancement if you're on board.

lustrousgorilla avatar Apr 01 '19 23:04 lustrousgorilla

You mean recasing atoms?

Recase.to_pascal(:"some-value") == :"SomeCase"

Why do you need it?

sobolevn avatar Apr 02 '19 07:04 sobolevn

I can think of a few use cases, but my immediate use case is generating select options in a Phoenix view helper. I need to map over a bunch of atoms to turn each value like :some_atom into a label string "Some Atom".

lustrousgorilla avatar Apr 02 '19 16:04 lustrousgorilla

Can you do it this way:

  1. atom -> string
  2. string snake -> string other case

?

sobolevn avatar Apr 02 '19 17:04 sobolevn