Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yidinghan/mongoose-paging

mongoose plugin for basic paging
https://github.com/yidinghan/mongoose-paging

mongoose mongoose-paging mongoose-plugin mpaging

Last synced: about 1 month ago
JSON representation

mongoose plugin for basic paging

Awesome Lists containing this project

README

        

# mongoose-paging

[![Greenkeeper badge](https://badges.greenkeeper.io/yidinghan/mongoose-paging.svg)](https://greenkeeper.io/)

[![Travis](https://img.shields.io/travis/yidinghan/mongoose-paging.svg?style=flat-square)](https://travis-ci.org/yidinghan/mongoose-paging)
[![npm](https://img.shields.io/npm/l/mpaging.svg?style=flat-square)](https://www.npmjs.com/package/mpaging)
[![npm](https://img.shields.io/npm/v/mpaging.svg?style=flat-square)](https://www.npmjs.com/package/mpaging)
[![npm](https://img.shields.io/npm/dm/mpaging.svg?style=flat-square)](https://www.npmjs.com/package/mpaging)
[![David](https://img.shields.io/david/yidinghan/mongoose-paging.svg?style=flat-square)](https://www.npmjs.com/package/mpaging)
[![David](https://img.shields.io/david/dev/yidinghan/mongoose-paging.svg?style=flat-square)](https://www.npmjs.com/package/mpaging)
[![node](https://img.shields.io/node/v/mongoose-paging.svg?style=flat-square)](https://www.npmjs.com/package/mpaging)

mongoose plugin for basic paging

# Getting Start

## NPM

Installation

```shell
npm i -S mpaging
```

## Usage

Quick code snippet

```javascript
const mpaging = require('mpaging');

schema.plugin(mpaging);

// init model, etc.

await model.paging();
await model.paging({ ding: 'dingding' });
await model.paging({}, { limit: 30 });
```