Here you can find the source of fromCurrency()
String.prototype.fromCurrency = function() { var pattern = /,\s*/g; return parseFloat(this.replace(pattern, "")); };
String.prototype.fromCurrency = function(){ var num = this.replace(/\,/g, ""); return parseFloat(num); };
String.prototype.fromCurrency = function() { return Number(this.replace(/,/g, '')); };
String.prototype.fromCurrency = function() { return Number(this.replace(/,/g, ""));