string-case-converter-utils
v1.0.1
Published
Convert strings between camel, snake, kebab, pascal, title, and constant cases. Chainable API.
Maintainers
Readme
string-case-converter-utils
A lightweight TypeScript/JavaScript utility library for converting strings between different case formats.
Perfect for Angular, Node.js, or any JavaScript/TypeScript project.
Features
- Convert strings to Title Case
- Convert strings to Camel Case
- Convert strings to Pascal Case
- Convert strings to Snake Case
- Convert strings to Kebab Case
- Convert strings to Upper Case
- Convert strings to Lower Case
Installation
npm install string-case-converter-utilsUsage
Importing
import {
toTitleCase,
toCamelCase,
toPascalCase,
toSnakeCase,
toKebabCase,
toUpperCase,
toLowerCase
} from "string-case-converter-utils";Examples
toTitleCase("hello world"); // "Hello World"
toCamelCase("hello world"); // "helloWorld"
toPascalCase("hello world"); // "HelloWorld"
toSnakeCase("hello world"); // "hello_world"
toKebabCase("hello world"); // "hello-world"
toUpperCase("hello world"); // "HELLO WORLD"
toLowerCase("HELLO WORLD"); // "hello world"API Reference
toTitleCase(input: string): string
Converts the first letter of each word to uppercase.
toCamelCase(input: string): string
Converts the string to camelCase.
toPascalCase(input: string): string
Converts the string to PascalCase.
toSnakeCase(input: string): string
Converts the string to snake_case.
toKebabCase(input: string): string
Converts the string to kebab-case.
toUpperCase(input: string): string
Converts the string to UPPERCASE.
toLowerCase(input: string): string
Converts the string to lowercase.
Project Structure
string-case-converter-utils/
├── src/
│ ├── index.ts
│ ├── cases/
│ │ ├── title-case.ts
│ │ ├── camel-case.ts
│ │ ├── pascal-case.ts
│ │ ├── snake-case.ts
│ │ ├── kebab-case.ts
│ │ ├── upper-case.ts
│ │ └── lower-case.ts
├── package.json
├── tsconfig.json
└── README.mdLicense
MIT License © 2025 Created by Guhapriya LS
