1.0.1 • Published 5 years ago

@stevenvanderlinden/pagination v1.0.1

Weekly downloads
1
License
-
Repository
-
Last release
5 years ago

Pagination

A simple but effective library to arange data over multiple pages.

Instalation

To install with npm use the following command

~ npm install --save @stevenvanderlinden/pagination

usage

To init pagination place the following code at the top of your javacript file

const pagination = require('@stevenvanderlinden/pagination');

pagination requires a few parameters. The first being the data array, the seccond being the id of the enclosig container

pagination.init(DATA, #CONTAINERID);

i.e:

const names = ["John", "Jane"];

pagination.init(names, 'container');

Out of the box pagination shows 3 results per page. With the follwing code you are able to set this to any number you like:

pagination.settings(int);

i.e:

pagination.settings(6);