mongoose-paginate-pages
v1.0.0
Published
An paginate plugin for mongoose
Downloads
5
Maintainers
Readme
mongoose-paginate-pages
Install
npm install mongoose-paginate-pages
Usage
var paginate = require('mongoose-paginate-pages');
Schema.plugin(paginate);
Model.paginate(query, options, function(err, results, total, pages) {
......
});
Options
page
limit
lean
sortBy
columns
populate
Callback(err, results, total, pages)
results
the results of querytotal
equals Model.count(query)pages
equals Math.ceil(total / limit)
Test
npm install && npm test
Thanks
edwardhotchkiss/mongoose-paginate
LISCENSE
MIT