Makes an array of objects by grouping the array values by page. Similar to
This function is valid in
v2.24.0 to v2.24.2.
This function has been downloaded 8 times.
indexPages() but includes the
items property in each object.
An array of items that should be chunked and the corresponding items for each page shown will be available in the returned array.
The number of the page to be selected.
0 will be coerced to
1. A negative number will be counted from the last page.
The maximum number of items to place in each page object.
The maximum number of page objects to return. The default value comes from
Array of objects representing pages. Each object will contain
number (the page number),
isSelected (a boolean indicating if the page is
isBoundary (a boolean indicating if
items (an array of the corresponding values from the
items passed in).
This function directly requires the following functions which are included automatically:
Makes an array of objects representing the pagination details based on the current page number, the number of pages and the maximum number of pages to show.
Confines a number to a specified range by looping number that are too large back to the beginning of the range and numbers that are too small back to the end of the range (just like in Pacman).
Slice does not modify the original array, but instead returns a shallow copy of elements from the original array.