Module

IxSignal.Extra

Package
purescript-zeta
Repository
athanclark/purescript-zeta

Utilities for asynchronously drawing values out of a signal.

#onWhen Source

onWhen :: forall b a rw. (b -> Maybe a) -> Handler a -> String -> IxSignal (read :: READ | rw) b -> Effect Unit

Applies the function only once, when the predicate is satisfied (potentially immediately)

#onAvailable Source

onAvailable :: forall a rw. Handler a -> String -> IxSignal (read :: READ | rw) (Maybe a) -> Effect Unit

Applies the handler once when the value exists

#getWhen Source

getWhen :: forall b a rw. (b -> Maybe a) -> String -> IxSignal (read :: READ | rw) b -> Aff a

Draws the value out when the predicate is matched, potentially immediately

#getAvailable Source

getAvailable :: forall a rw. String -> IxSignal (read :: READ | rw) (Maybe a) -> Aff a

Draws the value out when Just

#onNext Source

onNext :: forall a rw. Handler a -> String -> IxSignal (read :: READ | rw) a -> Effect Unit

Applies the handler only once, on the next change

#getNext Source

getNext :: forall a rw. String -> IxSignal (read :: READ | rw) a -> Aff a

Draws the value out on the next change