UNPKG

@aequum/mongoose

Version:

aequum mongoose tools for repository, pagination, CRUD/CRUDL, configs and utils

30 lines (29 loc) 818 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultMongoosePaginateOptions = void 0; require("mongoose-paginate-v2"); /** * Default options passsed to `mongoose-paginate-v2` * paginated queries. * * By default we just change the labels of a * standard paginated query to match. Notice the * `hasNextPage`, `hasPrevPage` and * `pagingCounter` properties are mapped to `_` * property this means will be ignored. */ exports.defaultMongoosePaginateOptions = { customLabels: { totalDocs: 'total', docs: 'data', limit: 'size', page: 'page', nextPage: 'next', prevPage: 'prev', hasNextPage: '_', hasPrevPage: '_', totalPages: 'pages', pagingCounter: '_', meta: 'paginator', } };