Socket
Socket
Sign inDemoInstall

swap-case

Package Overview
Dependencies
1
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    swap-case

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


Version published
Weekly downloads
4M
decreased by-3.84%
Maintainers
1
Install size
45.6 kB
Created
Weekly downloads
 

Package description

What is swap-case?

The swap-case npm package is designed to transform text by swapping the case of each character in a string. It converts lowercase letters to uppercase and vice versa, providing a simple and effective way to manipulate text case in JavaScript applications.

What are swap-case's main functionalities?

Swap Case

This feature allows you to swap the case of each character in a string. Lowercase letters become uppercase, and uppercase letters become lowercase. It's useful for text formatting and styling in applications.

const swapCase = require('swap-case');

let text = 'Hello World';
let swappedText = swapCase(text);
console.log(swappedText); // Outputs: 'hELLO wORLD'

Other packages similar to swap-case

Readme

Source

Swap Case

NPM version NPM downloads Bundle size

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"

License

MIT

Keywords

FAQs

Last updated on 02 Dec 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc