export function goStart (offset, limit, total) { console.log(`goStart: offset=${offset} limit=${limit} total=${total}`) const offset2 = 0 return offset2 } export function goEnd (offset, limit, total) { console.log(`goEnd: offset=${offset} limit=${limit} total=${total}`) let offset2 = Math.floor(total / limit) * limit return offset2 } export function goPrev (offset, limit, total) { console.log(`goPrev: offset=${offset} limit=${limit} total=${total}`) let offset2 = Math.max(0, offset - limit) return offset2 } export function goNext (offset, limit, total) { console.log(`goNext: offset=${offset} limit=${limit} total=${total}`) const maxNext = Math.floor(total / limit) * limit const nextNext = offset + limit let offset2 = Math.min(maxNext, nextNext) return offset2 }