Js.OptStandard functions for manipulating possibly null values.
type 'a t = 'a optval empty : 'a tNo value.
val return : 'a -> 'a tConsider a value as an optional value.
Apply a function to an optional value if it is available. Returns the result of the application.
Apply a function returning an optional value to an optional value
val test : 'a t -> boolReturns true if a value is available, false otherwise.
val iter : 'a t -> ('a -> unit) -> unitApply a function to an optional value if it is available.
val case : 'a t -> (unit -> 'b) -> ('a -> 'b) -> 'bPattern matching on optional values.
val get : 'a t -> (unit -> 'a) -> 'aGet the value. If no value available, an alternative function is called to get a default value.
val option : 'a option -> 'a tConvert option type.
val to_option : 'a t -> 'a optionConvert to option type.