Javascript String replaceAll() method

Description

Javascript String replaceAll() method


String.prototype.replaceAll = replaceAll;
module.exports = replaceAll;//www  . j  a  v  a  2  s  .  c  o  m

function replaceAll (match, set) {
    return this.replace(new RegExp(match, 'g'), set)
}



PreviousNext

Related