UNPKG

@quick-game/cli

Version:

Command line interface for rapid qg development

15 lines 570 B
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Debounce utility function, ensures that the function passed in is only called once the function stops being called and the delay has expired. */ export const debounce = function (func, delay) { let timer = 0; const debounced = () => { clearTimeout(timer); timer = window.setTimeout(() => func(), delay); }; return debounced; }; //# sourceMappingURL=Debouncer.js.map