An open API service indexing awesome lists of open source software.

https://github.com/writetome51/pagination-page-info

Intended to help a separate Paginator class paginate data. Specifically, this class contains the properties `itemsPerPage` and `totalPages`, which will be used by other classes
https://github.com/writetome51/pagination-page-info

batch data javascript paginate pagination typescript

Last synced: 8 months ago
JSON representation

Intended to help a separate Paginator class paginate data. Specifically, this class contains the properties `itemsPerPage` and `totalPages`, which will be used by other classes

Awesome Lists containing this project

README

          

# PaginationPageInfo

## Constructor

```ts
constructor(

private __dataSource: {

// dataTotal: number of items in entire dataset.
// This must stay accurate after any actions that change the total,
// such as searches.

dataTotal: number;
}
)
```

## Methods

view methods

```
setItemsPerPage(value: number): void

getItemsPerPage(): number

getTotalPages(): number
```

## Installation

`npm i @writetome51/pagination-page-info`

## Loading
```ts
// if using TypeScript:
import { PaginationPageInfo } from '@writetome51/pagination-page-info';
// if using ES5 JavaScript:
var PaginationPageInfo =
require('@writetome51/pagination-page-info').PaginationPageInfo;
```

## License
[MIT](https://choosealicense.com/licenses/mit/)