Case Switcher
Change the casing of a string.
This library provides functions to change the casing convention of a string.
Supported cases:
- camelCase
- dot.case
- kebab-case
- PascalCase
- path/case
- snake_case
- Title Case
- UPPER.DOT.CASE
- UPPER-KEBAB-CASE
- UPPER_SNAKE_CASE
Install
npm i case-switcher-js
yarn add case-switcher-js
Demo
import {
toCamel,
toDot,
toKebab,
toPascal,
toPath,
toSnake,
toTitle,
toUpperDot,
toUpperKebab,
toUpperSnake,
} from "case-switcher-js"
let sample = "avocado bagel-coffeeDONUTEclair_food.gravy"
toCamel(sample)
toDot(sample)
toKebab(sample)
toPascal(sample)
toPath(sample)
toSnake(sample)
toTitle(sample)
toUpperDot(sample)
toUpperKebab(sample)
toUpperSnake(sample)
Support The Developer