anorgatarrak-wordpress-theme/node_modules/underscore.string/replaceAll.js

9 lines
256 B
JavaScript

var makeString = require('./helper/makeString');
module.exports = function replaceAll(str, find, replace, ignorecase) {
var flags = (ignorecase === true)?'gi':'g';
var reg = new RegExp(find, flags);
return makeString(str).replace(reg, replace);
};