vue-currency-input
vue-currency-input copied to clipboard
Drop MAX_SAFE_INTEGER limitation
Currently, the input is limited to Number.MAX_SAFE_INTEGER.
Numbers should exposed as decimal strings ("1234.567"
) to allow arbitrary size and precision.
See also discussion #307
@dm4t2 Do you have any idea how much work is required to get this done? We are dealing with emission values that often have 10 or more decimal places, which means that we can enter just 6 digits before the decimal, which is not enough. Maybe we can contribute to get this done, if you are open to it?
I worked on this some time ago as part of a proof of concept but only archived it. Most of the work is already done, but there are a lot of changes, including breaking ones. I'm looking forward to releasing a v4 beta soon, depending on my free time. It would be great if you could help out with testing.
Any update on Integer limitation? it only support 13 digits. Would it be BigInt? or Double type?
The current plan is to expose numbers of arbitrary size/precision as decimal strings ("1234.567"
). BigInt will be only used for internal calculations.
I'm using decimal.js in my project along with vue-currency-input. I think we can extract numeric functions and add provider layer instead. Bringing decimal.js as a provider may be a better solution than using two different sources: string & BigInt. So for the rest, we can just use string-based numerical presentation.