2
0
mirror of https://github.com/tenrok/maska.git synced 2026-06-11 18:02:27 +03:00

#51 Added test,

switched jest env to jsdom,
lint fixed
This commit is contained in:
Yury Mamedov
2021-11-10 01:28:55 +03:00
parent d3f1a7b582
commit 0cf4d7c7b8
5 changed files with 32 additions and 11 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ function getOpts (mask) {
if (mask.mask) {
opts.mask = Array.isArray(mask.mask) ? JSON.stringify(mask.mask) : mask.mask
opts.tokens = mask.tokens ? { ...mask.tokens } : {}
opts.preprocessor = mask.preprocessor;
opts.preprocessor = mask.preprocessor
} else {
opts.mask = Array.isArray(mask) ? JSON.stringify(mask) : mask
}
@@ -32,7 +32,7 @@ const directive = () => {
if (state.has(el) && !needUpdate(mask)) {
return
}
state.set(el, new Maska(el, getOpts(mask.value)))
}
}