List of utility methods to do Currency Parse
fromCurrency()String.prototype.fromCurrency = function() { var pattern = /,\s*/g; return parseFloat(this.replace(pattern, "")); }; | |
fromCurrency()String.prototype.fromCurrency = function(){ var num = this.replace(/\,/g, ""); return parseFloat(num); }; | |
fromCurrency()String.prototype.fromCurrency = function() { return Number(this.replace(/,/g, '')); }; | |
fromCurrency()String.prototype.fromCurrency = function() { return Number(this.replace(/,/g, "")); |