@gravity-ui/data-source
Version:
A wrapper around data fetching
16 lines (15 loc) • 569 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getProgressiveRefetch = void 0;
var getProgressiveRefetch = exports.getProgressiveRefetch = function getProgressiveRefetch(_ref) {
var minInterval = _ref.minInterval,
maxInterval = _ref.maxInterval,
_ref$multiplier = _ref.multiplier,
multiplier = _ref$multiplier === void 0 ? 2 : _ref$multiplier;
return function (_query, count) {
return Math.min(minInterval * Math.pow(multiplier, count), maxInterval);
};
};
// #sourceMappingURL=getProgressiveRefetch.js.map
;