JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3766
  • Score
    100M100P100Q173900F
  • License MIT

Helpful decorators for typescript applications

Package Exports

  • helpful-decorators

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (helpful-decorators) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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