@alexvyber/convert-case
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Case Convert

Package for converting string cases

Install

npm install @alexvyber/convert-case
pnpm add @alexvyber/convert-case
yarn add @alexvyber/convert-case

Example

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")) // => OtherString

API

Table of Contents

camelToKebab

Converts a string from CamelCase to kebab-case.

Parameters

  • input T The string in CamelCase to be converted

Examples

camelToKebab("SomeString") // "some-string"

Returns Kebabtize The string in kebab-case

kebabToCamel

Converts a string from kebab-case to CamelCase.

Parameters

  • input T The string in kebab-case to be converted

Examples

kebabToCamel("some-string") // "SomeString"

Returns Camelize The string in CamelCase

Package Sidebar

Install

npm i @alexvyber/convert-case

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

7.31 kB

Total Files

6

Last publish

Collaborators

  • alexvyber