# mongoose-paginate-helper

> Interface based query pagination

Latest version **0.0.8** (published 2018-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install mongoose-paginate-helper
pnpm add mongoose-paginate-helper
yarn add mongoose-paginate-helper
bun add mongoose-paginate-helper
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2018-02-27 |
| First published | 2018-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ldpenal |
| Maintainers | ldpenal |
| Keywords | mongoose, cursor, paging, query |

## Links

- npm: https://www.npmjs.com/package/mongoose-paginate-helper
- Repository: https://github.com/ldpenal/mongoose-paginate-helper
- Homepage: https://github.com/ldpenal/mongoose-paginate-helper#readme
- Issues: https://github.com/ldpenal/mongoose-paginate-helper/issues
- npm.io page: https://npm.io/package/mongoose-paginate-helper

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 0.0.8 (latest) — 2018-02-27
- 0.0.7 — 2018-02-10
- 0.0.6 — 2018-02-09
- 0.0.5 — 2018-02-09
- 0.0.4 — 2018-02-09
- 0.0.3 — 2018-02-09
- 0.0.2 — 2018-02-09
- 0.0.1 — 2018-02-08

## README

# mongoose-paginate-helper

A simple helper to query MongoDB using a paging-like fashion.

## Loading helper

```javascript
const helper = require('mongoose-paginate-helper');
```

The `helper` identifier now contains the only exported function with function firm:

```javascript
async function (model, query, options);
```

## Arguments specification.
```javascript
/**
 * Pagination helper.
 * @param {Object} model Mongoose model's object, used interface of it.
 * @param {Object} query object query to perform.
 * @param {Object} options additional data
 * @param {Number} options.limit amount of results to retrieve.
 * @param {Boolean} options.lean when to perform lean queries.
 * @param {Object} options.fieldOrdering key-value pairs indicating results sorting.
 * @param {Object} options.select fields to project.
 * @param {Number} options.ordering use when _id base sorting, -1=desc 1=asc
 * @param {String} options.cursor id value from which start result retrieving.
 * @returns {Object} { list: [{}], cursor: 'string' }
 */
 ```

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