INNER CODE UNIT · JavaScript
skip
aravindnc/mongoose-paginate-v2 · src/index.js:173
skip = (page - 1) * limit;
} else {
offset = 0;
page = 1;
skip = offset;
}
if (!pagination) {
page = 1;
}
let countPromise;
// Only run count when pagination is enabled
if (pagination) {
if (forceCountFn === true) {
// Deprecated since starting from MongoDB Node.JS driver v3.1