-
Couldn't load subscription status.
- Fork 1.3k
Open
Description
Provide a general summary of the issue here
In 'de' locale the decimal separator is , , so theoretically a string like '1234.7' is invalid number, so i'd expect NaN as a result but we get 1234.7
const parser = new NumberParser('de', { useGrouping: false })
console.log(parser.parse('1234.7')) // 1234.7
In 'en' it works as expected and gives back NaN if a wrong separator is used
const parser = new NumberParser('en', { useGrouping: false })
console.log(parser.parse('1234,7')) // NaN
🤔 Expected Behavior?
const parser = new NumberParser('de', { useGrouping: false })
console.log(parser.parse('1234.7')) // NaN
😯 Current Behavior
const parser = new NumberParser('de', { useGrouping: false })
console.log(parser.parse('1234.7')) // 1234.7
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
const parser = new NumberParser('de', { useGrouping: false })
console.log(parser.parse('1234.7'))
Version
^3.6.5
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macos
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
Metadata
Metadata
Assignees
Labels
No labels