1.0.0 • Published 5 years ago

map-string v1.0.0

Weekly downloads
147
License
MIT
Repository
github
Last release
5 years ago

Map string Travis CI Build Status

Array.map for strings.

NPM Badge

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.