swap-case-commonjs
v3.0.5
Published
Transform a string by swapping every character from upper to lower case, or lower to upper case
Downloads
8
Maintainers
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
import { swapCase } from "swap-case";
swapCase("string"); //=> "STRING"
swapCase("dot.case"); //=> "DOT.CASE"
swapCase("PascalCase"); //=> "pASCALcASE"
TypeScript and ESM
This package is NOT a pure ESM package and ships with TypeScript definitions. It CAN be require
'd or used with CommonJS module resolution in TypeScript.
License
MIT