Miss any of our Open RFC calls?Watch the recordings here! »

swap-text

1.0.0 • Public • Published

Swap text Travis CI Build Status

Swap characters in a string.

NPM Badge

Install

npm install swap-text

Usage

const swapText = require("swap-text");
 
swapText("abcdef", "ab", "cd")
//=> 'cdabef'

API

swapText(string, a, b)

string

Type: string

The text to transform.

a

Type: string

The first group of characters to swap with the second.

b

Type: string

The second group of characters to swap with the first.

Install

npm i swap-text

DownloadsWeekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.17 kB

Total Files

6

Last publish

Collaborators

  • avatar