Common Utilities
  • Introduction πŸ‘‹
  • Getting Started
    • Installation πŸ“₯
    • Usage πŸ”§
  • Utilities
    • Packages πŸ“¦
      • Debounce πŸ“
      • Filter-array🧹
      • Merge-objectsπŸ‘―β€β™‚οΈ
      • String-interpolation🧡
      • Kebab-to-camel-string 🍒🐫
      • Trim-whitespace ⬜️
      • Wait-until-defined ⌚️
      • Compose πŸš‚
      • Repeat πŸ”
      • Pipe β›“
      • Trace πŸ‘€
    • Glossary πŸ“’
  • General
    • Comparision βš–οΈ
    • Cites πŸ™
Powered by GitBook
On this page
  • @common-utilities/debounce 🧰
  • Install
  • Usage
  • Common Utilities 🧰

Was this helpful?

  1. Utilities
  2. Packages πŸ“¦

Debounce πŸ“

PreviousPackages πŸ“¦NextFilter-array🧹

Last updated 4 years ago

Was this helpful?

@common-utilities/debounce 🧰

Debounce is a common function that waits a set amount of time before invoking a callback.

Install

yarn add @common-utilities/debounce -D

Usage

let result = 1
const add1 = (val) => {
  result = val + 1
}
debounce(add1, 1000)(1) // returns 2, after 1 second

Common Utilities 🧰

No cruft. No bloat. No dependencies.

Simple, typed, functional, documented, and tested javascript utility functions.

View other on Github.

common utilities
Typed with TypeScript
npm version