c

jshelpers

OptionOps

final class OptionOps[T] extends AnyVal

If you want js.UndefOr, use JSConverters .toOptionand .orUndefined.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OptionOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new OptionOps(a: Option[T])

Value Members

  1. def ??[B >: T](default: => B): B
  2. def ???[B >: T](other: Option[B]): Option[B]
  3. def filterNull: Option[T]

    Filter nulls out in case it *might* be null.

  4. def filterTruthy: Option[T]

    If Some and value is truthy according to JS, then keep it, otherwise become a None.

  5. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  6. def orElseNull: Option[T]

    If Some, keep the value, else set the value to null.

Deprecated Value Members

  1. def toNonNullOption: Option[T]

    Filter nulls out in case it *might* be null.

    Filter nulls out in case it *might* be null.

    Deprecated

    USe filterNull.