UNPKG

mongoose-paginate-v2

Version:

A custom pagination library for Mongoose with customizable labels.

12 lines (11 loc) 333 B
"use strict"; /** * Helper function to paginate a query. * * @param {Object} options - The pagination options. * @returns {Promise} - A promise that resolves to the paginated query result. */ function paginateQueryHelper(options) { return this.model.paginate(this.getQuery(), options); } module.exports = paginateQueryHelper;