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

Casenator is your go-to tool for all things string transformation. Whether you need to switch between camelCase, PascalCase, kebab-case and many more! π
---
camelCase.PascalCase.kebab-case.Capital Case.dot.case.CONSTANT_CASE.no case.snake_case./pathCase.COBOL-CASE.1337 5p34k.custom-delimiter where - is the new delimiter.---
``bash`
npm install casenator
---
π οΈ Usage
Hereβs how to start transforming your strings with Casenator:
`javascript
// Import the functions you need from Casenator
import {
toCamelCase,
toPascalCase,
toKebabCase,
toUpperCase,
reverseString,
substring,
toCapitalCase,
toConstantCase,
toDotCase,
toNoCase,
toSnakeCase,
toPathCase,
toCobolCase,
toLeetSpeak,
convertToCustomDelimiter,
transformArrayStrings
} 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'
// Transform Array of Strings
console.log(transformArrayStrings(['hello world', 'foo bar'], 'snake')); // ['hello_world', 'foo_bar']
``
---
---
---