Closed devjayprakash closed 1 month ago
Current behaviour The logic for the toNumber (https://github.com/shivamsouravjha/stock-frontend/blob/master/src/utils/common.js) utils function does not work properly for floating point number as it does not consider dot ".".
toNumber
So it converts 2.34 to 234
Expected behaviour It should consider dots "." as well while converting string.
Fix In the regex we should include matching "dots "as well.
Fixed in #27
Current behaviour The logic for the
toNumber
(https://github.com/shivamsouravjha/stock-frontend/blob/master/src/utils/common.js) utils function does not work properly for floating point number as it does not consider dot ".".So it converts 2.34 to 234
Expected behaviour It should consider dots "." as well while converting string.
Fix In the regex we should include matching "dots "as well.