remap Replace each character of a string using a map const remap = require('remap') var chars = { f: 't', b: 'f' } var value = 'foo bar' console.log(remap(chars)(value)) // -> too far Installation npm install --save baggo/remap License MIT