2
0
mirror of https://github.com/tenrok/maska.git synced 2026-06-08 17:22:27 +03:00

Make tokens argument optional

This commit is contained in:
Alexander Shabunevich
2021-07-01 15:06:18 +03:00
parent 6ad4f6581c
commit 1209e09dc6
10 changed files with 27 additions and 15 deletions
+10
View File
@@ -140,6 +140,16 @@ While specifying custom tokens you can also add a symbol-transformation behavior
}
```
## Use mask programmatically
You can use `mask` function directly by importing it (or using `Maska.mask` if you use script tag)
``` javascript
import { mask } from 'maska'
const maskedValue = mask(value, '###')
```
## Getting raw (unmasked) value
To get raw value read `data-mask-raw-value` property of input. You can subscribe to `@maska` event to know when this value updates. Please see [examples page](https://beholdr.github.io/maska/).