Map string
Array.map for strings.
Install
npm install map-string
Usage
const mapString = require("mapString");
mapString("abcd", (val) => {
if (val === "b") return "!"
return val
});
//=> 'a!cd'
API
mapString(string, iteratee)
string
Type: string
The string to iterate.
iteratee
Type: function(value, index, string)
The iteratee to use.