string.replaceAll({
'xxx' : 'yyy',
'aaa' : 'bbb'
});
<source lang="javascript">
replaceAll: function (find, replace) {
var type = atom.typeOf(find);
if (type == 'regexp') {
return this.replace(find, function (symb) { return replace[symb]; });
} else if (type == 'object') {
for (var i in find) this.replaceAll(i, find[i]);
return this;
}
return this.split(find).join(replace);
},