Skip to content
Mongoose Query Pagination
CoffeeScript JavaScript
Find file
Latest commit 379be59 Dec 26, 2013 @russmatney russmatney Merge pull request #2 from yamadapc/master
Set mongoose as a peerDependency and a devDependency

README.md

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

Something went wrong with that request. Please try again.