unmaskValue

Mask
stable

Strip mask characters from a formatted string and return only the raw user input. Delegates to applyMask() and extracts its unmasked output.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

value
requis
string
The masked (formatted) string, e.g. "(12) 3456-7890".
pattern
requis
string
The mask pattern that was applied to produce the formatted value, e.g. "(##) ####-####".

API

Valeur de retour

La valeur retournée par cet util.

The raw characters with mask separators removed, e.g. "1234567890".

Usage

Exemples

Extraits de code prêts à coller.

Strip mask from a phone number

typescript