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

feat: introduce the decodeFilter function to refactor filter parsing #1005

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

EshaanAgg
Copy link
Contributor

@EshaanAgg EshaanAgg commented Feb 29, 2024

Fixes #731 by creating a decodeFilter function, which splits the filterID passed to it and returns an object containing all the parts. Refactors all the previous usages of the old .split("_") approach as well to make use of this new helper function.

@PhilippWendler
Copy link
Member

Thank you very much! I like a lot that you also thought of and added documentation, error handling, and unit tests nicely! 👍 This is fine to merge.

I am just wondering whether you maybe see more potential for refactorings in a similar way, i.e., by identifying duplicate (or just complex pieces of) code and moving them out into functions that can be individually documented tested?

@EshaanAgg
Copy link
Contributor Author

Thanks for the review! I'll surely open issues regarding possible refactorings if I come across them in my exploration of the codebase!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Refactor filter parsing in JS code
2 participants