knex-paginate
Advanced tools
Comparing version 3.1.3 to 3.1.4
@@ -21,2 +21,6 @@ const Knex = require('knex'); | ||
if (currentPage < 1) { | ||
currentPage = 1; | ||
} | ||
const shouldFetchTotals = isLengthAware || currentPage === 1 || isFromStart; | ||
@@ -26,6 +30,2 @@ let pagination = {}; | ||
if (currentPage < 1) { | ||
currentPage = 1; | ||
} | ||
const offset = isFromStart ? 0 : (currentPage - 1) * perPage; | ||
@@ -32,0 +32,0 @@ const limit = isFromStart ? perPage * currentPage : perPage; |
{ | ||
"name": "knex-paginate", | ||
"version": "3.1.3", | ||
"version": "3.1.4", | ||
"description": "Extension of Knex's query builder with `paginate` method that will help with your pagination tasks.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package