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: Refactor common functions and fix typos #13

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

Conversation

cypherpepe
Copy link

  1. Fix typos in README.md

    • Corrected several typos and grammatical errors to improve readability.
  2. Refactor eventParser.ts

    • Extracted common functions to improve maintainability and readability.
  3. Simplify blockIdFlag conversion in signedHeader.ts

  • Used a mapping object to replace multiple if-else statements for cleaner and more efficient code.

- Extracted common logic into helper functions to reduce code duplication.
- Improved readability by consolidating attribute extraction logic into `getAttribute()` and `parsePacketAttributes()`.
- No functional changes, purely a code quality improvement.
- Replaced multiple if-else statements in blockIdFlagConvert with a mapping object to simplify logic.
- Improved readability and maintainability by making flag conversion more concise.
- This change has no impact on functionality but makes the code easier to extend in the future.
Corrected several typos and grammatical errors for improved readability.
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