@tempots/dom
Signal.mapMaybe property
Maps the values of the signal using the provided function fn
, and returns a new signal containing the mapped values. If the mapped value is undefined
or null
, it is replaced with the provided alt
value.
Signature:
readonly mapMaybe: (fn: (value: T) => O | undefined | null, alt: O) => Computed;