npm.io
3.0.3 • Published 2 years ago

swap-case

Licence
MIT
Version
3.0.3
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
2.4K

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

Keywords