apache / couchdb-fauxton

Fauxton is the new Web UI for CouchDB
https://github.com/apache/couchdb-fauxton
Apache License 2.0
373 stars 225 forks source link

Optimize getParams + Prettify utils #1431

Closed RedYetiDev closed 1 month ago

RedYetiDev commented 3 months ago

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 tool.

Testing recommendations

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

This fixes no issues, but does end up resolving the comment // I think this could be combined into one if.

Related Pull Requests

N/A

Checklist

RedYetiDev commented 3 months ago

Hi team, any update?