Skip to content
Swaps two characters in a string.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE.txt
README.md
index.js
package-lock.json
package.json

README.md

Build Status Coverage Status JavaScript Style Guide

swap-chars

Swaps two characters in a string.

Node Repository

https://www.npmjs.com/package/@pelevesque/swap-chars

Installation

npm install @pelevesque/swap-chars

Tests

Standard Style & Unit Tests

npm test

Unit Tests & Coverage

npm run cover

Usage

const swapChars = require('@pelevesque/swap-chars')
const string = 'bad bed led lad'
const result = swapChars(string, 'a', 'e')
// result === 'bed bad lad led'
You can’t perform that action at this time.