npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

alter-case

v1.0.2

Published

A versatile npm package for converting text to different casing styles, including lowercase, uppercase, title case, and sentence case.

Downloads

43

Readme

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

| 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.