1.0.0 • Published 5 years ago
map-string v1.0.0
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.
1.0.0
5 years ago