If a value is held, this uses the mapping function to transform it, and returns Optional
Returns the value is defined, otherwise it returns defaultValue
Returns the value if Some(), otherwise it throws a reference error.
This is the nuclear option, .or(default)
should be preferred.
Used to wrap a function that can potentially return null or undefined in a safe wrapper
const safeQuerySelector = Optional.wrap(document.querySelector)
Generated using TypeDoc
If None() replace it with a value