@nexim/sanitizer
Version:
A collection of sanitization utilities for phone numbers and numeric inputs with TypeScript type safety.
10 lines (7 loc) • 1.52 kB
Markdown
# @nexim/sanitizer
## Functions
| Function | Description |
| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [sanitizeNumberStringToEnglish](functions/sanitizeNumberStringToEnglish.md) | Sanitizes a number to English string format, preserving leading zeros. If input is a string, converts Unicode digits to English and validates it's a valid number. If input is already a number, converts it to string. |
| [sanitizeNumberToEnglish](functions/sanitizeNumberToEnglish.md) | Sanitizes a number to English format. If input is already a number, returns it as-is. If input is a string, converts Unicode digits to English and validates it's a valid number. |
| [sanitizePhoneNumber](functions/sanitizePhoneNumber.md) | Sanitizes a phone number by converting Unicode digits, removing special characters, and standardizing the format with country code. |