0.1.3 • Published 3 years ago

arpa-js v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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 --save

Usage

Already tested on express and react projects

ParameterTypeDescription
dataarrayRequired. Your data array
limitnumberRequired. Array limit of page
pagenumberRequired. 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);

Authors

License

MIT