parsePattern
Mask
stable
Compile a mask pattern string into an array of `IMaskToken` objects. `#` matches a digit, `A` matches a letter, `*` matches any character, and all other characters become literal separators. Results are cached per pattern.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- patternrequisstring
- The mask pattern string. Special characters: `#` (digit), `A` (letter), `*` (any). Every other character is treated as a literal separator (e.g. `-`, `/`, `(`, `)`).
API
Valeur de retour
La valeur retournée par cet util.
- An array of token descriptors, each with `{ kind, char, consumer }`. `consumer: true` means the token consumes one character of user input; `consumer: false` means it is a literal automatically inserted.
Usage
Exemples
Extraits de code prêts à coller.
Compile a phone number mask