mirror of
https://github.com/Kong/insomnia
synced 2024-11-12 17:26:32 +00:00
318c35c2cb
* Some minor implementations * Some more * Lots more * Removed 'backend' alias * removed all promises * Removed a bunch of module exports stuff * Some morE' * Fix * custom DNS * Tests for DNS * bug fix * Some small adjustments * Small stuff
12 lines
270 B
JavaScript
12 lines
270 B
JavaScript
import {DEBOUNCE_MILLIS} from '../../backend/constants';
|
|
|
|
export function debounce (callback) {
|
|
let timeout = null;
|
|
return function () {
|
|
clearTimeout(timeout);
|
|
timeout = setTimeout(() => {
|
|
callback.apply(null, arguments)
|
|
}, DEBOUNCE_MILLIS);
|
|
}
|
|
}
|