Nodejs Utililty Methods Currency Parse

List of utility methods to do Currency Parse

Description

The list of methods to do Currency Parse are organized into topic(s).

Method

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, ""));