1.0.0 • Published 4 years ago

swap-text v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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.