final class JsUndefOrBooleanOps extends UndefOrCommon[Boolean]
- Alphabetic
- By Inheritance
- JsUndefOrBooleanOps
- UndefOrCommon
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def !?[B >: Boolean](default: => B): B
Same as
.getOrElse
just shorter.Same as
.getOrElse
just shorter.- Definition Classes
- UndefOrCommon
- Annotations
- @inline()
- def ??[B >: Boolean](default: => B): B
Same as
.getOrElse
just shorter.Same as
.getOrElse
just shorter.- Definition Classes
- UndefOrCommon
- Annotations
- @inline()
- val a: UndefOr[Boolean]
- Definition Classes
- JsUndefOrBooleanOps → UndefOrCommon
- def as[B]: UndefOr[B]
Changes what's inside but preserves UndefOr.
Changes what's inside but preserves UndefOr.
- Definition Classes
- UndefOrCommon
- def filterNull: UndefOr[Boolean]
null => undefined, else the value remains.
null => undefined, else the value remains.
- Definition Classes
- UndefOrCommon
- def filterTruthy: UndefOr[Boolean]
Keep the value if its truthy, otherwise return undefined.
Keep the value if its truthy, otherwise return undefined.
- Definition Classes
- UndefOrCommon
- def flip: UndefOr[Boolean]
Flip the boolean if defined.
Flip the boolean if defined.
- Annotations
- @inline()
- def isNull: Boolean
Tests for overall nullness which is different than
.isEmpty|.nonEmpty
.Tests for overall nullness which is different than
.isEmpty|.nonEmpty
.- Definition Classes
- UndefOrCommon
- def isTotalEmpty: Boolean
This may override
UndefOr.isEmpty
but this checks for null as well.This may override
UndefOr.isEmpty
but this checks for null as well.- Definition Classes
- UndefOrCommon
- def orFalse: Boolean
Get the value or return false.
Get the value or return false.
- Annotations
- @inline()
- def orTrue: Boolean
Get the value or return true.
Get the value or return true.
- Annotations
- @inline()
- def toNonNullOption: Option[Boolean]
This could also be
_.toOption.filter(_ != null)
but below is slightly faster.This could also be
_.toOption.filter(_ != null)
but below is slightly faster.- Definition Classes
- UndefOrCommon
- def toNull: |[Boolean, Null]
Convert UndefOr[A] => A|Null
Convert UndefOr[A] => A|Null
- Definition Classes
- UndefOrCommon
- def toStringJs: String
Calls toString.
Calls toString. I'm not sure this is needed at all.
- Definition Classes
- UndefOrCommon
- def toTruthy: Boolean
Equivalent to !!someJSValue
Equivalent to !!someJSValue
- Definition Classes
- UndefOrCommon
- def toUndefOrNull: UndefOr[|[Boolean, Null]]
Uh-oh, thought it was
js.UndefOr[A]
but you need to say its ajs.UndefOr[A|Null]
because the docs were wrong :-).Uh-oh, thought it was
js.UndefOr[A]
but you need to say its ajs.UndefOr[A|Null]
because the docs were wrong :-).- Definition Classes
- UndefOrCommon
- Annotations
- @inline()