@sceat/debounce

1.0.1 • Public • Published

Will execute after 100ms when calls stops

import debounce from '@sceat/debounce'
const debounce_100 = debounce(100)
const debounce_me = debounce_100(() => { console.log('debounced') })

debounce_me()
debounce_me()

Will execute at least once after 1s

import debounce from '@sceat/debounce'
const debounce_100_max_1000 = debounce(100, 1000)
const debounce_me = debounce_100_max_1000(() => { console.log('debounced') })

debounce_me()
debounce_me()

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @sceat/debounce

      Weekly Downloads

      1

      Version

      1.0.1

      License

      ISC

      Unpacked Size

      1.28 kB

      Total Files

      3

      Last publish

      Collaborators

      • sceat