Package Exports
- arpa-js
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 (arpa-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Arpa
Arpa is Array Pagination for Javascript Project. Can be used for backend and frontend.
- Easy to use
- Lightweight
Install
To install Arpa
npm i arpa-js --saveUsage
Already tested on express and react projects
| Parameter | Type | Description |
|---|---|---|
data |
array |
Required. Your data array |
limit |
number |
Required. Array limit of page |
page |
number |
Required. Page of pagination |
import arpa from 'arpa-js';
const array = [
{
id: 1,
title: 'yellow',
body: 'yellow body',
},
{
id: 2,
title: 'blue',
body: 'blue body',
},
{
id: 3,
title: 'green',
body: 'green body',
},
{
id: 4,
title: 'black',
body: 'black body',
},
];
const example = arpa({ data: array, limit: 2, page: 1 });
console.log(example);