Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/yidinghan/mongoose-paging
- Owner: yidinghan
- License: apache-2.0
- Created: 2017-12-13T02:43:34.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T15:14:50.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T06:34:31.641Z (8 months ago)
- Topics: mongoose, mongoose-paging, mongoose-plugin, mpaging
- Language: JavaScript
- Size: 2.97 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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 });
```