New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

paginate-array-ts

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paginate-array-ts

Pagination for arrays in javascript

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
23
4.55%
Maintainers
1
Weekly downloads
 
Created
Source

Array pagination

Simple pagination for arrays in javascript

Installation

npm install paginate-array-ts

Usage


import { paginateArray } from 'paginate-array-ts';
const collection = [...];

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

The result of paginateCollection will be an object:

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

Keywords

pagination

FAQs

Package last updated on 08 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts