@288-toolkit/timeout

4.0.0 • Public • Published

Timeout

A collection of function for timeouts.

sleep

Resolves a promise after a given time.

throttle

Return a throttled function that will run the callback at most once until the timer expires.

A re-export of https://github.com/angus-c/just/tree/master/packages/function-throttle

debounce

Return a debounced function that will run the callback ms after the last invocation.

A re-export of https://github.com/angus-c/just/tree/master/packages/function-debounce

interval

Creates an interval that calls a function at a fixed interval using requestAnimationFrame. Returns a function that cancels the interval.

throttleRaf

Return a throttled function that is called at most once per animation frame.

Readme

Keywords

none

Package Sidebar

Install

npm i @288-toolkit/timeout

Weekly Downloads

59

Version

4.0.0

License

MIT

Unpacked Size

3.84 kB

Total Files

10

Last publish

Collaborators

  • nitriques
  • f-elix