UNPKG

knex-paginate

Version:

Extension of Knex's query builder with `paginate` method that will help with your pagination tasks.

17 lines (14 loc) 355 B
function assertNumber(paramName, value) { if (isNaN(value)) { throw new Error(`Paginate error: ${paramName} must be a number.`); } } function assertBoolean(paramName, value) { if (typeof value !== 'boolean') { throw new Error(`Paginate error: ${paramName} must be a boolean.`); } } module.exports = { assertNumber, assertBoolean, };