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

casenator

v1.7.2

Published

Casenator is a lightweight utility package for converting strings between camelCase, PascalCase, kebab-case, uppercase, lowercase, and more, with built-in exception handling.

Downloads

159

Readme

🦸‍♂️ Casenator - The Ultimate String Transformation Utility ⚡️

npm version License

Casenator is your go-to tool for all things string transformation. Whether you need to switch between camelCase, PascalCase, kebab-case and many more! 🎉


🔥 Features

  • 🔄 CamelCase – Convert any string to camelCase.
  • 🏛 PascalCase – Format strings in PascalCase.
  • 📐 KebabCase – Get your strings into kebab-case.
  • 🔠 Uppercase – Make everything UPPERCASE.
  • 🔡 Lowercase – Convert text to lowercase.
  • 🔙 Reverse – Reverse the characters in a string.
  • 🔍 Substring – Extract specific parts of your string.
  • 🦊 CapitalCase - Convert any string to Capital Case.
  • 🐒 DotCase - Format string in dot.case.
  • 🦀 ConstantCase - Get your string into CONSTANT_CASE.
  • 🐸 NoCase - Convert any string to no case.
  • 🐬 SnakeCase - Format string in snake_case.
  • 🦁 PathCase - Get your string into /pathCase.
  • 🦧 CobolCase - Format string in COBOL-CASE.
  • 🐫 LeetSpeak - Make everything 1337 5p34k.
  • 🦄 ConvertWithCustomDelimiter - Convert any string to custom-delimiter where - is the new delimiter.

🚀 Installation

First, add Casenator to your project via npm:

npm install casenator

🛠️ Usage Here’s how to start transforming your strings with Casenator:

// Import the functions you need from Casenator
import { 
    toCamelCase,
    toPascalCase,
    toKebabCase,
    toUpperCase,
    reverseString,
    substring,
    toCapitalCase,
    toConstantCase,
    toDotCase,
    toNoCase,
    toSnakeCase,
    toPathCase,
    toCobolCase,
    toLeetSpeak,
    convertToCustomDelimiter
} from 'casenator';

// Camel Case
console.log(toCamelCase('Hello world!'));  // 'helloWorld'

// Pascal Case
console.log(toPascalCase('hello world'));  // 'HelloWorld'

// Kebab Case
console.log(toKebabCase('Hello World!'));  // 'hello-world'

// Uppercase
console.log(toUpperCase('hello world'));   // 'HELLO WORLD'

// Reverse a String
console.log(reverseString('Hello'));       // 'olleH'

// Substring
console.log(substring('hello world', 0, 5));  // 'hello'

// Capital Case
console.log(toCapitalCase('hello world'));  // 'Hello World'

// Dot Case
console.log(toDotCase('hello-world'));  // 'hello.world'

// Constant Case
console.log(toConstantCase('hello world'));  // 'HELLO_WORLD'

// No Case
console.log(toNoCase('hello--world'));  // 'hello world'

// Snake Case
console.log(toSnakeCase('hello world')); // 'hello_world'

// Path Case
console.log(toPathCase('hello world')); // '/helloWorld'

// Cobol Case
console.log(toCobolCase('hello world')); // 'HELLO-WORLD'

// Leet Speak
console.log(toLeetSpeak('hello world')); // 'h3110 w021d'

// Convert With Custom Delimiter
console.log(convertWithCustomDelimiter("hello-world", "-", ".")); // 'hello.world'

🔥 Why Casenator?

  • 🚀 Lightweight – Minimal footprint and blazingly fast.
  • 🛡️ Robust – Handles invalid inputs with helpful errors.
  • 🛠️ Versatile – Perfect for all your string formatting needs.
  • Tested – Comprehensive unit test coverage for all edge cases.

📝 License

This project is licensed under the MIT License. See the LICENCE file for details.


🙌 Contributing

Feel free to contribute, raise issues, or suggest features to make casenator even better! 🤘