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

3.0.3 • Public • Published

Swap Case

Transform a string by swapping every character from upper to lower case, or lower to upper case.

Installation

npm install swap-case --save

Usage

import { swapCase } from "swap-case";

swapCase("string"); //=> "STRING"
swapCase("dot.case"); //=> "DOT.CASE"
swapCase("PascalCase"); //=> "pASCALcASE"

TypeScript and ESM

This package is a pure ESM package and ships with TypeScript definitions. It cannot be require'd or used with CommonJS module resolution in TypeScript.

License

MIT

/swap-case/

    Package Sidebar

    Install

    npm i swap-case

    Weekly Downloads

    3,985,619

    Version

    3.0.3

    License

    MIT

    Unpacked Size

    2.8 kB

    Total Files

    5

    Last publish

    Collaborators

    • blakeembrey