Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying minLimit #54

Open
ajmas opened this issue Mar 31, 2020 · 0 comments
Open

Allow specifying minLimit #54

ajmas opened this issue Mar 31, 2020 · 0 comments

Comments

@ajmas
Copy link

ajmas commented Mar 31, 2020

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;
  }

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant