mongoose-pagination

Mongoose Query Pagination

npm install mongoose-pagination
9 downloads in the last day
26 downloads in the last week
198 downloads in the last month

mongoose-pagination Build Status

Mongoose Query Pagination

Installation

$ npm install mongoose-pagination

Usage

require 'mongoose-pagination'

model
  .find()
  .paginate(1, 10)
  .exec(function(err, docs) {
    console.log('docs: ', docs)
  });

model
  .find()
  .paginate(1, 10, function(err, docs, total) {
    console.log('total: ', total, 'docs: ', docs)
  });

Tests

$ npm test

Authors Christopher Garvis & Moveline

License

MIT

npm loves you