Skip to content

refactor: extract helper for argument normalization#73

Open
Ayoub-Mabrouk wants to merge 1 commit intojshttp:masterfrom
Ayoub-Mabrouk:refactor/extract-argument-normalization
Open

refactor: extract helper for argument normalization#73
Ayoub-Mabrouk wants to merge 1 commit intojshttp:masterfrom
Ayoub-Mabrouk:refactor/extract-argument-normalization

Conversation

@Ayoub-Mabrouk
Copy link

Extract repetitive argument handling into a normalizeArguments() helper, This centralizes logic used in types(), encodings(), charsets(), and languages(), reducing duplication and improving maintainability.

  • Add normalizeArguments() for flattened argument lists
  • Use Array.from() instead of manual loop
  • Update JSDoc types
  • Use const for helper return values

Extract repetitive argument handling into a normalizeArguments() helper.
This centralizes logic used in types(), encodings(), charsets(), and languages(),
reducing duplication and improving maintainability.

- Add normalizeArguments() for flattened argument lists
- Use Array.from() instead of manual loop
- Update JSDoc types
- Use const for helper return values
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