0.1.0 • Published 2 years ago

govna v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

govna

Debounce, throttle, and tick wrappers to govern when a function executes. See helpful visual examples of what debounce, throttle, and tick do.

Install

npm install govna

Usage

import { debounce, throttle, tick } from 'govna';

const foo = (str) => str;
const delay = 200;

const debouncedFn = debounce(foo, delay);
const throttledFn = throttle(foo, delay);
const tickedFn = tick(foo);

debouncedFn('debounced');
throttledFn('throttled');
tickedFn('ticked');