@vtex/vtexis-compatibility-layer
Version:
Compatibility layer between intelligent search and VTEX
10 lines (9 loc) • 335 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProductsCountAndPage = void 0;
const getProductsCountAndPage = (from, to) => {
const count = to - from + 1;
const page = Math.round((to + 1) / count);
return [count, page];
};
exports.getProductsCountAndPage = getProductsCountAndPage;