UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.

24 lines (20 loc) 537 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var debounce = function debounce(callback, time) { var interval; return function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } clearTimeout(interval); interval = setTimeout(function () { interval = null; callback.apply(void 0, args); }, time); }; }; var _default = debounce; exports.default = _default;