Value entry for Scala/ScalaJS
libraryDependencies ++= Seq(
"com.github.allantl" %%% "value-entry" % "0.2.1"
)
import com.allantl.value.entry.ValueEntry
sealed trait Fruit extends ValueEntry
case object Apple extends Fruit
Apple.value // Apple: String
import com.allantl.value.entry.ValueEntry
sealed trait Fruit extends ValueEntry.Uncapitalized
case object GreenApple extends Fruit
GreenApple.value // greenApple: String
import com.allantl.value.entry.ValueEntry
sealed trait Fruit extends ValueEntry.SnakeCase with ValueEntry.LowerCase
case object RedApple extends Fruit
RedApple.value // red_apple: String