Module

FRP.Event.Time

Package
purescript-behaviors
Repository
paf31/purescript-behaviors

#interval Source

interval :: Int -> Event Int

Create an event which fires every specified number of milliseconds.

#animationFrame Source

animationFrame :: Event Unit

Create an event which fires every frame (using requestAnimationFrame).

#withTime Source

withTime :: forall a. Event a -> Event { time :: Number, value :: a }

Create an event which reports the current time in milliseconds since the epoch.

#debounce Source

debounce :: forall a. Number -> Event a -> Event a

On each event, ignore subsequent events for a given number of milliseconds.

#debounceWith Source

debounceWith :: forall b a. (Event a -> Event { period :: Number, value :: b }) -> Event a -> Event b

Provided an input event and transformation, block the input event for the duration of the specified period on each output.