Minimal debounce function with immediate call support. 65 bytes (minified and gzipped) Size Limit controls the size
npm install nano-debounce --save
import debounce from 'nano-debounce';
debounce(callback, ms);
debounce(callback, ms, true); // with immediate call