Paginate your data easily
npm install pagination_node
const pagination = require('pagination_node')
pagination.paginate(array,params) // return an object
array : array of data you want to paginate it can be an array of string or object
params : a object with 2 properties
{ page : specify the page you want to display. by default it displays first page
limit : the number of occurrences per page. by default it displays 10
}
const array = [{name :"Franck"},{name :"Alice"},{name :"Arthur"},{name :"Auréole"},{name :"Albert"},{name :"Tony"},{name :"Blaise"}]
const params = { page:2, limit:3 }