Javascript String toValidId()

Description

Javascript String toValidId()

String.prototype.toValidId = function() {
    var content = this;
    return content.replace(/\s/g, '-');
};

Javascript String toValidId()

String.prototype.toValidId = function () { // eslint-disable-line no-extend-native
    var content = this;
    return content.replace(/\s/g, '-');
};



PreviousNext

Related