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

Refactor BDPatcher #1722

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Refactor BDPatcher #1722

wants to merge 1 commit into from

Conversation

deadshumz
Copy link

Refactor BDPatcher: Streamline error handling, optimize patch filtering, and improve code readability with modern JavaScript syntax

…ng, and improve code readability with modern JavaScript syntax
@rauenzi
Copy link
Member

rauenzi commented Feb 27, 2024

Aside from subjective readability, is there any benefit to this?

@deadshumz
Copy link
Author

Aside from subjective readability, is there any benefit to this?

Added logError function to simplify error logging.
Added applyPatch function to handle callback calls and reduce code duplication.
One pass is used to separate patch.children into categories, which reduces the total number of iterations.
Using switch functions to shorten and simplify the code.

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

Successfully merging this pull request may close these issues.

None yet

2 participants