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(parse): Simplify message filtering and processing logic parseResult #476

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jeet-dhandha
Copy link

This pull request includes changes to the parseResults function in the packages/pglite/src/parse.ts file. The main goal of these changes is to improve the readability and maintainability of the code by using a Set for valid message types and replacing conditional statements with a switch statement.

Code readability and maintainability improvements:

  • Introduced a Set named VALID_MESSAGE_TYPES to store valid message types and used it in the filter method.
  • Replaced multiple if-else statements with a switch statement to handle different message types more clearly. [1] [2] [3]

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.

1 participant