Skip to content

Refactor FundingRaised with Clean Code improvements#3

Open
LediDi060 wants to merge 8 commits intoSoftwareEngineering2026:masterfrom
LediDi060:refactor/funding-raised
Open

Refactor FundingRaised with Clean Code improvements#3
LediDi060 wants to merge 8 commits intoSoftwareEngineering2026:masterfrom
LediDi060:refactor/funding-raised

Conversation

@LediDi060
Copy link
Copy Markdown

Refactored the FundingRaised class to improve readability, maintainability, and reuse:

  • Extracted mapRow function – removes duplication (DRY).
  • Extracted applyFilters function – separates concerns (SRP), reusable filtering.
  • Replaced magic numbers with COLUMNS constants – self-documenting code.
  • Extracted CSV filename to FUNDING_FILE constant – easier to maintain and update.

Benefits: cleaner, more readable code; reduced duplication; easier future extensions (e.g., async CSV loading or new filters).

Files changed: node/funding_raised.js

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