2
0
mirror of https://github.com/tenrok/maska.git synced 2026-06-20 20:00:34 +03:00

Docs for preprocessor option

This commit is contained in:
Alexander Shabunevich
2021-11-13 17:41:22 +03:00
parent acee49cf46
commit 15f363741b
8 changed files with 21 additions and 10 deletions
+11
View File
@@ -102,6 +102,17 @@ var mask = Maska.create('.masked', {
});
```
You also can pass custom preprocessing transformation function for entire input:
``` javascript
var mask = Maska.create('.masked', {
tokens: { 'Z': { pattern: /[а-яА-Я]/ }},
preprocessor: value => {
return value.toUpperCase();
}
});
```
You can destroy mask like that:
``` javascript