Allow specifying minLimit
ajmas opened this issue · comments
Andre-John Mas commented
Since we can now pass ?limit0
, would it be worth adding an optional, third parameter to the middleware function, such that:
exports.middleware = function middleware(limit, maxLimit, minLimit) {
}
The alternative is doing something as follows, if we care about order of min and max:
exports.middleware = function middleware(limit, minOrMaxLimit, maxLimit) {
let minLimit = 0;
if (maxLimit) {
minLimit = minOrMaxLimit;
}
}