# array-page

> Get a page worth of records from an array

Latest version **1.3.1** (published 2015-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install array-page
pnpm add array-page
yarn add array-page
bun add array-page
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2015-11-18 |
| First published | 2015-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dan VerWeire |
| Maintainers | wankdanker |
| Keywords | array, page, paging, count, records, pageNumber, pageSize |

## Links

- npm: https://www.npmjs.com/package/array-page
- Repository: https://github.com/wankdanker/node-array-page
- Homepage: https://github.com/wankdanker/node-array-page#readme
- Issues: https://github.com/wankdanker/node-array-page/issues
- npm.io page: https://npm.io/package/array-page

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.3.1 (latest) — 2015-11-18
- 1.3.0 — 2015-11-18
- 1.2.0 — 2015-09-21
- 1.1.0 — 2015-09-21

## README

array-page
----------

[![Build Status](https://travis-ci.org/wankdanker/node-array-page.svg)](https://travis-ci.org/wankdanker/node-array-page)

Get a page worth of records

example
-------

```js
require('array-page').applyPrototype();
var a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];

var page = a.page(/*page number*/ 2, /*page size*/ 3);

console.log(page);
// [1,2,3,4,5, _page: { page: 1, size: 5, count: 4, start: 0, stop: 5, first: 1, last: 4, next: 2, previous: null, total : 20 } ]

```

install
-------

```bash
npm install array-page
```

api
---

### arrayPage = require('array-page')

### arrayPage(array, pageNumber, pageSize)

* array: the array to get a page from
* pageNumber: the specific page of elements to return
* pageSize: the number of records to include in the page

### arrayPage.applyPrototype()

Add a `page` method to the Array prototype

### arrayPage.defaults(opts);

* opts:
  * pageSize : numeric; default page size. Default is 20;


license
-------

MIT

---
_Source: https://npm.io/package/array-page · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
