0.0.2 • Published 2 years ago
@alexvyber/convert-case v0.0.2
Case Convert
Package for converting string cases
Install
npm install @alexvyber/convert-casepnpm add @alexvyber/convert-caseyarn add @alexvyber/convert-caseExample
import { camelToKebab, kebabToCamel } from "@alexvyber/convert-case"
console.log(camelToKebab("SomeString")) // => some-string
console.log(camelToKebab("otherString")) // => other-string
console.log(kebabToCamel("some-string")) // => SomeString
console.log(kebabToCamel("other-string")) // => OtherStringAPI
Table of Contents
camelToKebab
Converts a string from CamelCase to kebab-case.
Parameters
inputT The string inCamelCaseto be converted
Examples
camelToKebab("SomeString") // "some-string"Returns Kebabtize The string in kebab-case
kebabToCamel
Converts a string from kebab-case to CamelCase.
Parameters
inputT The string inkebab-caseto be converted
Examples
kebabToCamel("some-string") // "SomeString"Returns Camelize The string in CamelCase