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

1.0.2 • Public • Published

Alter Case

Transforming Text, Transforming Possibilities: Your all-in-one npm package for hassle-free text casing conversions.



NPM License npm bundle size NPM Version GitHub commit activity


GitHub followers

Easily convert text to lowercase, UPPERCASE, Title Case, and Sentence case with a single npm package.

Welcome to Alter Case, the comprehensive npm package designed to simplify text casing transformations. Whether you need to convert words to lowercase, UPPERCASE, Title Case, or sentence case, our versatile module offers an intuitive and efficient solution. With a user-friendly interface, seamless integration, and robust performance, Alter Case is the go-to choice for developers looking to enhance their text formatting capabilities.

Installing

Using npm:

$ npm install alter-case

Once the package is installed, you can use this by import or require

const { toTitleCase, toSentenceCase } = require("alter-case");

or

import { toTitleCase, toSentenceCase } from "alter-case";

Example

Note: Only string inputs are allowed
The function only compete with the string inputs. Other data types will throw an error with entered data types

// import or require the package
import { toTileCase, toSentenseCase } from "alter-case";

const title = toTitleCase("this is the sample title");
console.log(title);
// This Is The Sample Title

Available functions

function Description SampleResponse
toUpperCase Coverts every letters to uppercase SAMPLE RESULT
toLowerCase Coverts every letters to lowercase sample result
toTitleCase Coverts first letter of every words into uppercase Sample Result
toSentenceCase Coverts first letter of every sentence to uppercase and add a space after the dot, before starting the next sentence This is sample result. This is sentence case.

Note: The sentence is calculated by dot or period or .
A sentense is measured by the occurance of dot or period or .. So the next word after the dot will be the uppercase and the sentence starts with a space

Contribution Alert

We welcome and encourage contributions from the community! If you're interested in improving Alter Case, fixing bugs, or adding new features, please check out our Contribution Guidelines. We appreciate your support and look forward to collaborating with you!

Guidelines

  • Branching Strategy

    • Develop Branch: The develop branch is the main integration branch. Please base your work on this branch. Create feature branches off develop and submit pull requests back to develop when your work is ready
  • Development Workflow

    1. Fork the repository.
    2. Clone your forked repository locally.
    3. Checkout the develop branch: git checkout develop.
    4. Create a feature branch: git checkout -b feature/your-feature-name.
    5. Make your changes, commit, and push to your feature branch.
    6. Open a pull request against the develop branch.
  • Typescript

    • Alter Case is written in TypeScript. Make sure to adhere to TypeScript best practices and use the appropriate TypeScript features in your contributions.
  • Code Style and Linting

    • Use a 2-space indentation throughout the codebase.
    • Regularly clean up and remove unused variables from your code to maintain clarity and reduce clutter.
    • Use double quotes for string literals consistently.

Package Sidebar

Install

npm i alter-case

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

10.2 kB

Total Files

12

Last publish

Collaborators

  • muhammedsheheem