@c.p/throttle

throttle a function call from being called too often

Usage no npm install needed!

<script type="module">
  import cPThrottle from 'https://cdn.skypack.dev/@c.p/throttle';
</script>

README

Usage

var throttle = require('@c.p/throttle');

var throttled = throttle(1000, yourFunction);

// calling throttled multiple times will call yourFunction, at most, once per second