UNPKG

609 BMarkdownView Raw
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```
8npm install swap-case --save
9```
10
11## Usage
12
13```js
14import { swapCase } from "swap-case";
15
16swapCase("string"); //=> "STRING"
17swapCase("dot.case"); //=> "DOT.CASE"
18swapCase("PascalCase"); //=> "pASCALcASE"
19```
20
21## TypeScript and ESM
22
23This 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
27MIT