1.7.3 β€’ Published 7 months ago

casenator v1.7.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

πŸ¦Έβ€β™‚οΈ 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! 🀘

1.7.3

7 months ago

1.7.2

9 months ago

1.7.1

9 months ago

1.7.0

9 months ago

1.6.0

9 months ago

1.5.0

10 months ago

1.4.0

10 months ago

1.3.0

11 months ago

1.2.1

11 months ago

1.2.0

11 months ago

1.1.0

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago