1.0.2 • Published 3 months ago

alter-case v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
3 months ago

NPM License npm bundle size NPM Version GitHub commit activity

GitHub followers

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

functionDescriptionSampleResponse
toUpperCaseCoverts every letters to uppercaseSAMPLE RESULT
toLowerCaseCoverts every letters to lowercasesample result
toTitleCaseCoverts first letter of every words into uppercaseSample Result
toSentenceCaseCoverts first letter of every sentence to uppercase and add a space after the dot, before starting the next sentenceThis 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.