param resultCount param totalCount example export function getLastPage ( resultCount , totalCount ) { return Math . ceil ( totalCount / resultCount ) ; } param range example export function getRangeMin ( range ) { return range [ 0 ] ; } param range example export function getRangeMax ( range ) { return range [ range . length - 1 ] ; } param currentPage param resultCount example export function getVisibleResultsMin ( currentPage , resultCount ) { return currentPage * resultCount - resultCount + 1 ; } param currentPage param resultCount param totalCount example export function getVisibleResultsMax ( currentPage , resultCount , totalCount ) { if ( totalCount < currentPage * resultCount ) { return totalCount ; } return currentPage * resultCount ; }