mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
feat(utils): add delay helper to utils
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
;(function(window, undefined) {
|
||||
|
||||
|
||||
window.delay = function(func, wait) {
|
||||
var args = Array.prototype.slice.call(arguments, 2);
|
||||
return setTimeout(function(){ return func.apply(null, args); }, wait);
|
||||
};
|
||||
|
||||
|
||||
/* Debounce and throttle functions taken from underscore.js */
|
||||
window.debounce = function(func, wait, immediate) {
|
||||
var timeout;
|
||||
|
||||
Reference in New Issue
Block a user