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

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

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

API

Return value

The value returned by this util.

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

Usage

Examples

Ready-to-paste usage snippets.

Strip mask from a phone number

typescript