I\'ve been trying to figure out how to map a set of characters in a string to another set similar to the tr function in Perl.
tr
I found this site that sh
There isn't a built-in equivalent, but you can get close to one with replace:
data = data.replace(/[\-_]/g, function (m) { return { '-': '+', '_': '/' }[m]; });