Skip to content

NetanelBasal/paginate-array

Repository files navigation

Build Status

Array pagination

Simple pagination for arrays in javascript

Installation

npm install paginate-array

Usage

const paginate = require("paginate-array");
const collection = [...];

const paginateCollection = paginate(collection[,pageNumber, numItemsPerPage]);

console.log(paginateCollection)

{
    currentPage: 1,
    perPage: 10,
    total: 20,
    totalPages: 2,
    data: [...]
}

About

Array pagination

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published