0.0.3 • Published 3 years ago

debouncie v0.0.3

Weekly downloads
10
License
MIT
Repository
-
Last release
3 years ago

GitHub license npm version PRs Welcome

Debounce function which returns a promise. Lower memory footprint than alternative solutions

Node Install: $ npm install --save debouncie Deno Install: coming soon

Example

import debouncie from 'debouncie';

function someAsyncFunction(a, b, c) {
  return Promise.resolve();
}

const debounced = debouncie(someAsyncFunction, { debounce: 500 });

debounced('a', 'b', 'c')
.then(() => {
  // Do something else. This doesn't normally return a promise in, for example, lodash debounce.
});