swap-case-commonjs
TypeScript icon, indicating that this package has built-in type declarations

3.0.5 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i swap-case-commonjs

      Weekly Downloads

      2

      Version

      3.0.5

      License

      MIT

      Unpacked Size

      2.92 kB

      Total Files

      5

      Last publish

      Collaborators

      • martinshaw