map-string
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i map-string

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

3.09 kB

Total Files

6

Last publish

Collaborators

  • richienb