UNPKG

bonsai-analyzer

Version:
17 lines (14 loc) 281 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = debounce; function debounce(fn, delay = 250) { let timer = null; return function () { if (timer) { clearTimeout(timer); } timer = setTimeout(fn, delay); }; }