# swap-case

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

Latest version **3.0.3** (published 2024-01-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install swap-case
pnpm add swap-case
yarn add swap-case
bun add swap-case
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2024-01-14 |
| First published | 2014-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2406 |
| Author | Blake Embrey |
| Maintainers | blakeembrey |
| Keywords | swap, case, invert, convert, transform, lower, upper |

## Links

- npm: https://www.npmjs.com/package/swap-case
- Repository: https://github.com/blakeembrey/change-case
- Homepage: https://github.com/blakeembrey/change-case/tree/master/packages/swap-case#readme
- Issues: https://github.com/blakeembrey/change-case/issues
- npm.io page: https://npm.io/package/swap-case

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 3.0.3 (latest) — 2024-01-14
- 3.0.2 — 2023-10-20
- 3.0.1 — 2023-10-03
- 3.0.0 — 2023-09-30
- 2.0.2 — 2020-12-02
- 2.0.1 — 2019-12-06
- 2.0.0 — 2019-12-01
- 1.1.2 — 2015-12-16
- 1.1.1 — 2015-05-11
- 1.1.0 — 2015-01-12
- 1.0.2 — 2014-08-23
- 1.0.1 — 2014-08-17
- 1.0.0 — 2014-08-17
- 0.0.1 — 2014-03-24

## README

# 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

```js
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](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) and ships with TypeScript definitions. It cannot be `require`'d or used with CommonJS module resolution in TypeScript.

## License

MIT

---
_Source: https://npm.io/package/swap-case · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
