Option to match against
Option to return when left
contains a value
Either right
or a None
Return None
if left
does not contain a value,
otherwise call right
with the wrapped value and return the result
Option to match against
Function to call when left
contains a value
Either returning value of right
or a None
Flatten deepOptionPromise
Option to flatten
Promise that resolves flattened option
Turn a Some
into a Promise
that resolves
or turn a None
into a Promise
that rejects
Option to unwrap
A Promise
that may resolve contained value
Return contained value of a Some
or default value
Option to unwrap
Value to return when option
does not contain a value
Promise that resolves contained value or def
Return contained value of a Some
or call a function
Option to unwrap
Function to be called when option
does not contain a value
Promise that resolves to either contained value or returning value of none
Unwrap contained value of a Some
,
or throws an error
Option to unwrap
Error to throw when option
does not contain a value
Contained value
Clone an option
Option to clone
A new copy of option
Convert ok(x)
to an some(x)
and convert err(_)
to none()
Result to convert
Corresponding Option
In reality, this function merely returns the same object it takes
since Result
interface is compatible with Option
Return a None
if option
does not contain a value,
otherwise call predicate
and return:
None
if predicate
returns false
Some
if predicate
returns true
Option to match against
Whether should filter
return a Some
when option
contains a value
An Option
Return contained option within deepOption
Option to flatten
Flattened option
Return an iterator over the possibly contained value
Option to iterate over
An iterator that yields contained value
Apply a function to the contained value (if any)
Option to match against
Function to call when option
contains a value
An Option
of fn
's return value
Match an option against a pair of functions
Option to match against
Functions to handle each case
Turn null
or undefined
into a None
and others into a Some
Nullable value
An Option
Return left
if it contains a value,
otherwise return right
Option to match against
Option to return when left
does not contain a value
Either left
or right
Return left
if it contains a value,
otherwise call right
and return the result
Option to match against
Function to call when left
does not contain a value
Either left
or return value of right
Transposes an Option
of Result
into a Result
of Option
Option
of Result
Result
of Option
Return a tuple of the contained value if option
contains a value,
otherwise return an empty tuple
Option to get value from
An array that may contain contained value
Return contained value of a Some
or throw a TypeError
Option to unwrap
Contained value
Return contained value of a Some
or default value
Option to unwrap
Value to return when option
does not contain a value
Either contained value or def
Return contained value of a Some
or call a function
Option to unwrap
Function to be called when option
does not contain a value
Either contained value or returning value of none
Unwrap contained value of a Some
,
or throws an error
Option to unwrap
Error to throw when option
does not contain a value
Contained value
Generated using TypeDoc
Return a
None
ifleft
does not contain a value, otherwise returnright