paginate-array

    2.1.0 • Public • Published

    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: [...]
    }

    Install

    npm i paginate-array

    DownloadsWeekly Downloads

    1,858

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    4.35 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar