RedYetiDev opened a new pull request, #1431:
URL: https://github.com/apache/couchdb-fauxton/pull/1431
<!-- Thank you for your contribution!
Please file this form by replacing the Markdown comments
with your text. If a section needs no action - remove it.
Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
of code collaboration. Positive feedback is represented +1 from
committers
and negative is a -1. The -1 also means veto, and needs to be addressed
to proceed. Once there are no objections, the PR can be merged by a
CouchDB committer.
See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
## Overview
This PR optimizes the `getParams` function to prevent the use of needless
statements (such as while loops). With less statements, the function will block
the event loop less, and run smoother.
> Note: The above is the primary reason for this PR. While I was
implementing this, I also ran the code through the
[prettier](https://tinyurl.com/5hbkwxaa) tool.
<!-- Please give a short brief for the pull request,
what problem it solves or how it makes things better. -->
## Testing recommendations
<!-- Describe how we can test your changes.
Does it provides any behaviour that the end users
could notice? -->
This function should not require any changes to the original codebase, and
will not provide any front-end change. To test these, try running it with
varying formats of query parameters.
## GitHub issue number
<!-- If this is a significant change, please file a separate issue at:
https://github.com/apache/couchdb-fauxton/issues
and include the number here and in commit message(s) using
syntax like "Fixes #472" or "Fixes apache/couchdb#472". -->
This fixes no issues, but does end up resolving the comment `// I think this
could be combined into one if`.
## Related Pull Requests
<!-- If your changes affects multiple components in different
repositories please put links to those pull requests here. -->
N/A
## Checklist
- [x] Code is written and works correctly;
- [ ] Changes are covered by tests;
> This shouldn't require any changes to existing tests, but I've left this
unchecked until you have confirmed
- [ ] Documentation reflects the changes;
> This shouldn't require any changes to existing documentation, but I've
left this unchecked until you have confirmed
- [ ] Update
[rebar.config.script](https://github.com/apache/couchdb/blob/main/rebar.config.script)
with the correct tag once a new Fauxton release is made
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]