Skip to content

Conversation

@Ayoub-Mabrouk
Copy link

@Ayoub-Mabrouk Ayoub-Mabrouk commented Dec 17, 2025

  • Add createURLSearchParams helper function in utils.ts
  • Replace duplicate for...in loops with helper in http-axios.ts and http-fetch.ts
  • Improve type safety from any to Record<string, unknown>
  • Filter null/undefined values consistently across all HTTP methods
  • Add unit tests for the helper function

This reduces code duplication and improves maintainability while ensuring consistent behavior for URL parameter handling.

- Add createURLSearchParams helper function in utils.ts
- Replace duplicate for...in loops with helper in http-axios.ts and http-fetch.ts
- Improve type safety from 'any' to 'Record<string, unknown>'
- Filter null/undefined values consistently across all HTTP methods

This reduces code duplication and improves maintainability while
ensuring consistent behavior for URL parameter handling.
@CLAassistant
Copy link

CLAassistant commented Dec 17, 2025

CLA assistant check
All committers have signed the CLA.

Add comprehensive unit tests for createURLSearchParams function to
verify:
- Basic string value handling
- Type conversion (numbers, booleans)
- Null/undefined filtering
- Edge cases (empty object, mixed types)

This ensures the helper function works correctly in isolation and follows the existing testing pattern for utility functions.
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.

2 participants