camelcase-to-kebab

convert camelCase to kebab-case

Usage no npm install needed!

<script type="module">
  import camelcaseToKebab from 'https://cdn.skypack.dev/camelcase-to-kebab';
</script>

README

camelcase-to-kebab

convert camelCase to kebab-case

🔧 Install · 🧩 Example · 🚴 Bench · 📜 API docs · 🔥 Releases · 💪🏼 Contribute · 🖐️ Help


Install

$ npm i camelcase-to-kebab

Example

import { camelCaseToKebab } from 'camelcase-to-kebab'

console.log(camelCaseToKebab('helloKebabWorld'))
// => hello-kebab-world

Bench

camelcase-to-kebab performs best among the top downloaded packages in npm and is probably the fastest way to do it if you just want that conversion and not any-to-kebab:

API

Table of Contents

camelCaseToKebab

src/index.ts:7-18

Converts a string from camelCase to kebab-case.

Parameters

  • input string The string in camelCase to be converted

Returns any The string in kebab-case

See also

Contribute

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2021 stagas