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

feat: url parse add parseQueryInts function and tests #81

Merged
merged 3 commits into from
Dec 18, 2024
Merged

Conversation

iugo
Copy link
Member

@iugo iugo commented Dec 18, 2024

No description provided.

iugo added 2 commits December 18, 2024 13:24
- Introduced parseQueryInts function to convert URL query parameter values into an array of integers, with support for custom separators.
- Enhanced error handling to throw TypeError for invalid inputs, ensuring robust type safety.
- Added unit tests for parseQueryInts in url-parse.test.ts, covering various input scenarios including valid integers, empty strings, and invalid formats.
- Updated documentation with detailed JSDoc comments in both English and Chinese, clarifying parameters, return values, and error handling.
- Introduced parseQueryNumbers function to convert URL query parameter values into an array of numbers, supporting custom separators.
- Enhanced error handling to throw TypeError for invalid inputs, including NaN and Infinity values.
- Added unit tests for parseQueryNumbers in url-parse.test.ts, covering various input scenarios including valid numbers, empty strings, and invalid formats.
- Updated documentation with detailed JSDoc comments in both English and Chinese, clarifying parameters, return values, and error handling.
@iugo iugo self-assigned this Dec 18, 2024
@iugo iugo merged commit 93aff67 into main Dec 18, 2024
1 check passed
@iugo iugo deleted the feat-url-parse branch December 18, 2024 05:28
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