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

rf: rename type and fn #79

Merged
merged 4 commits into from
Dec 17, 2024
Merged

rf: rename type and fn #79

merged 4 commits into from
Dec 17, 2024

Conversation

iugo
Copy link
Member

@iugo iugo commented Dec 17, 2024

No description provided.

iugo added 4 commits December 17, 2024 12:12
- Renamed `isSafeString` to `isStrictSafeString` and updated its implementation to enforce stricter validation criteria for strings.
- Renamed `genSafeString` to `genStrictSafeString` to reflect the stricter generation of safe strings.
- Updated corresponding unit tests to match the new function names and ensure they validate the expected behavior for strict safety checks.
- Updated the isStrictSafeString function to use a regular expression for improved string validation, ensuring only alphanumeric characters are accepted.
- Added new test cases to validate the function against various inputs, including numeric strings and disallowed characters.
- This change enhances the robustness of string validation in the codebase.
- Added detailed JSDoc comments for the StrictSafeString type and isStrictSafeString function, including descriptions in both English and Chinese.
- Improved the documentation for the fromUnicodeStr and textWithBOM functions, clarifying parameter types and return values.
- Enhanced overall code readability and maintainability through better documentation practices.
…iles

- Removed the isStrictSafeString function and its tests from str.ts and str.test.ts, respectively.
- Added the isStrictSafeString function and its corresponding test cases to string.ts and string.test.ts for better organization and clarity.
- This change improves the structure of the codebase by ensuring that string validation functions and tests are located together.
@iugo iugo self-assigned this Dec 17, 2024
@iugo iugo merged commit d07b7d0 into main Dec 17, 2024
1 check passed
@iugo iugo deleted the rf-fn-name branch December 17, 2024 04:22
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