Hi, thanks for the library. It's exactly what I was searching for.
One question, though: Why is there no Js.Bool?
Just a simple base class for Js.True and Js.False. It doesn't even need an implementation. Just apply and unapply...
Example (not tested or anything):
sealed abstract class Bool extends Value {
def value: Boolean
}
object Bool {
def apply(value: Boolean): Bool = if (value) True else False
def unapply(bool: Bool): Option[Boolean] = bool.value
}
case object False extends Value{
def value = false
}
case object True extends Value{
def value = true
}
Would have made some things more convenient for me 😄
ID: 218
Original Author: SrTobi
Hi, thanks for the library. It's exactly what I was searching for. One question, though: Why is there no
Js.Bool
? Just a simple base class forJs.True
andJs.False
. It doesn't even need an implementation. Just apply and unapply... Example (not tested or anything):Would have made some things more convenient for me 😄 ID: 218 Original Author: SrTobi