@plexis/to-swap

0.0.22 • Public • Published

@plexis/toSwap

Swaps every character with the next one in a given string.

npm i @plexis/to-swap

Usage

import toSwap from '@plexis/to-swap';

toSwap('ab'); // returns 'ba'
toSwap('abc'); // returns 'bac'
toSwap('abcd'); // returns 'badc'
toSwap('a b'); // returns ' ab'

Aliases

import {toSwap} from 'plexis';
import {swap} from 'plexis';

/@plexis/to-swap/

    Package Sidebar

    Install

    npm i @plexis/to-swap

    Weekly Downloads

    1

    Version

    0.0.22

    License

    MIT

    Unpacked Size

    3.76 kB

    Total Files

    6

    Last publish

    Collaborators

    • vorillaz