simple-debouncer

1.0.3 • Public • Published

#Simple debouncer

It's so simple. I promise.

##How to install

npm i simple-debouncer

How it works

For my needs, it will wait for last input change and execute (eg. requests, dispatching actions) so I can avoid multiple requests

<input type="text" onkeypress="debounce(() => { console.log('Yay') }, 3000)">

##How to use

import { debounce }  from 'simple-debouncer'

//On input event change? Or even on computed? Your choice!

debounce( () => { console.log("Hello!")}, 3000)

Where 3000 is timeout waiting for input changes

And... that's it! Just simple debouncer for your needs

/simple-debouncer/

    Package Sidebar

    Install

    npm i simple-debouncer

    Weekly Downloads

    3

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    1.13 kB

    Total Files

    3

    Last publish

    Collaborators

    • axotion