Formats a number for persistence, independent of the device region.
The numeric value to format
Maximum number of fractional digits to keep
The formatted string, using storageDecimalSeparator
formatDecimalForStorage(133.33333, 4) // returns '133,3333'formatDecimalForStorage(200, 2) // returns '200' Copy
formatDecimalForStorage(133.33333, 4) // returns '133,3333'formatDecimalForStorage(200, 2) // returns '200'
Formats a number for persistence, independent of the device region.