Skip to content

Commit

Permalink
fix(uf()): remove all thousand seperators
Browse files Browse the repository at this point in the history
  • Loading branch information
HIRANO-Satoshi authored May 16, 2017
1 parent 720db64 commit 40f549d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export class I18N {
let thousandSeparator = comparer[1];
let decimalSeparator = comparer[5];

// remove thousand seperator
let result = number.replace(thousandSeparator, '')
// remove all thousand seperators
let result = number.replace(new RegExp(thousandSeparator, 'g'), '')
// remove non-numeric signs except -> , .
.replace(/[^\d.,-]/g, '')
// replace original decimalSeparator with english one
Expand Down

0 comments on commit 40f549d

Please sign in to comment.