mirror of
https://github.com/tenrok/maska.git
synced 2026-05-15 11:59:38 +03:00
feat: allow float input
This commit is contained in:
@@ -182,3 +182,10 @@ test('NaN check', () => {
|
||||
expect(mask.masked('.')).toBe('')
|
||||
expect(mask.masked(',')).toBe('')
|
||||
})
|
||||
|
||||
test('float input', () => {
|
||||
const mask = new Mask({ number: { locale: 'uk', fraction: 2 } })
|
||||
|
||||
expect(mask.masked(1234.56)).toBe('1 234,56')
|
||||
expect(mask.unmasked(1234.56)).toBe('1234.56')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user