1 | # Swap Case
|
2 |
|
3 | > Transform a string by swapping every character from upper to lower case, or lower to upper case.
|
4 |
|
5 | ## Installation
|
6 |
|
7 | ```
|
8 | npm install swap-case --save
|
9 | ```
|
10 |
|
11 | ## Usage
|
12 |
|
13 | ```js
|
14 | import { swapCase } from "swap-case";
|
15 |
|
16 | swapCase("string"); //=> "STRING"
|
17 | swapCase("dot.case"); //=> "DOT.CASE"
|
18 | swapCase("PascalCase"); //=> "pASCALcASE"
|
19 | ```
|
20 |
|
21 | ## TypeScript and ESM
|
22 |
|
23 | This package is a [pure ESM package](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) and ships with TypeScript definitions. It cannot be `require`'d or used with CommonJS module resolution in TypeScript.
|
24 |
|
25 | ## License
|
26 |
|
27 | MIT
|