File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,7 @@ function getCurrencyDividerAndDecimal(divider: CurrencyDivider | undefined) {
5757 } ;
5858}
5959
60- /** removes decimal dot and comma from a string */
61- function removeDividerAndDecimal ( value : string ) : string {
60+ function removeAllDotsAndCommas ( value : string ) : string {
6261 return value . replace ( / [ , . ] / g, '' ) ;
6362}
6463
@@ -98,7 +97,7 @@ export function getValueFromCurrencyMask({
9897 if ( value . length >= newValue . length ) return undefined ;
9998
10099 if ( newValue . includes ( decimal ) ) {
101- let intVal = removeDividerAndDecimal ( newValue . split ( decimal ) [ 0 ] ) ;
100+ let intVal = removeAllDotsAndCommas ( newValue . split ( decimal ) [ 0 ] ) ;
102101 let fractionalVal = newValue . split ( decimal ) [ 1 ] ;
103102
104103 intVal = iDontYetKnowWhatsGoingOnHere ( intVal , divider ) ;
@@ -121,7 +120,7 @@ export function getValueFromCurrencyMask({
121120 }
122121 } else if ( newValue . length > 3 ) {
123122 let arr : string [ ] = [ ] ;
124- let unmasked = removeDividerAndDecimal ( newValue ) ;
123+ let unmasked = removeAllDotsAndCommas ( newValue ) ;
125124
126125 newValue = iDontYetKnowWhatsGoingOnHere ( unmasked , divider ) ;
127126 }
You can’t perform that action at this time.
0 commit comments