Skip to main content
Shared Runs in your resource.
  • WaitFor calls check every interval ms (default 0, every frame) until it returns a truthy value, for at most timeout ms (default 5000). ok is false on timeout. MUST run in a thread.
  • Timeout runs fn after ms and returns a function that cancels it.
  • Debounce returns a function that runs fn once calls stop for ms, with the arguments of the last call.
  • Throttle returns a function that runs fn at most once per ms. The first call runs at once, calls in between are dropped.

Example