Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 862 Bytes

README.md

File metadata and controls

42 lines (29 loc) · 862 Bytes

Value Entry

Build Status

Value entry for Scala/ScalaJS

libraryDependencies ++= Seq(
    "com.github.allantl" %%% "value-entry" % "0.2.1"
)

Quick Start

import com.allantl.value.entry.ValueEntry

sealed trait Fruit extends ValueEntry
case object Apple extends Fruit

Apple.value // Apple: String

Uncapitalized

import com.allantl.value.entry.ValueEntry

sealed trait Fruit extends ValueEntry.Uncapitalized
case object GreenApple extends Fruit

GreenApple.value // greenApple: String

SnakeCase

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