string-translate
v1.1.1
Published
Replaces characters in a string given two sets of symbols
Downloads
51
Maintainers
Readme
string-translate
Replaces characters in a string given two sets of symbols
Install
npm i string-translate
Usage
var tr = require('string-translate');
tr('abc', '123', 'abc');
// => '123'
tr('abB', 'aBb', 'abcB');
// => 'aBcb'
tr('ÁÉÍÓÚáéíóúñ', 'AEIOUaeioun', 'Álvaro García Goñi');
// => 'Alvaro Garcia Goni'