swap-text
TypeScript icon, indicating that this package has built-in type declarations

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1
  • 0.0.0
    0

Package Sidebar

Install

npm i swap-text

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.17 kB

Total Files

6

Last publish

Collaborators

  • richienb