(cursor: number, total: number, maxVisible?: number)
| 4127 | } |
| 4128 | |
| 4129 | const entriesToDisplay = (cursor: number, total: number, maxVisible?: number) => { |
| 4130 | const max = maxVisible === undefined ? total : maxVisible |
| 4131 | let startIndex = Math.min(total - max, cursor - Math.floor(max / 2)) |
| 4132 | if (startIndex < 0) { |
| 4133 | startIndex = 0 |
| 4134 | } |
| 4135 | const endIndex = Math.min(startIndex + max, total) |
| 4136 | return { startIndex, endIndex } |
| 4137 | } |
no outgoing calls
no test coverage detected