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

refactor!: change completed behavior for dynamic mask

This commit is contained in:
Alexander Shabunevich
2024-07-07 16:50:51 +03:00
parent c442153ce1
commit f47d4ca65d
3 changed files with 18 additions and 5 deletions
+1 -3
View File
@@ -78,11 +78,9 @@ export class Mask {
if (typeof this.opts.mask === 'string') {
return length >= this.opts.mask.length
} else if (typeof this.opts.mask === 'function') {
return length >= mask.length
}
return this.opts.mask.filter((m) => length >= m.length).length === this.opts.mask.length
return length >= mask.length
}
private findMask (value: string): string | null {