Nodejs String Delete Comma deleteComma()

Here you can find the source of deleteComma()

Method Source Code

String.prototype.deleteComma = function () {
    var string = this;
    while (string != (string = string.replace(/^(-?\d+)(\d{3})/, "$1,$2")));
    return string;
}