https://github.com/stagas/camelcase-to-kebab
convert camelCase to kebab-case
https://github.com/stagas/camelcase-to-kebab
camelcase kebab-case
Last synced: about 1 year ago
JSON representation
convert camelCase to kebab-case
- Host: GitHub
- URL: https://github.com/stagas/camelcase-to-kebab
- Owner: stagas
- Created: 2021-11-19T08:37:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-18T08:37:12.000Z (over 4 years ago)
- Last Synced: 2025-02-11T08:45:28.083Z (over 1 year ago)
- Topics: camelcase, kebab-case
- Language: TypeScript
- Homepage:
- Size: 474 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
camelcase-to-kebab
convert camelCase to kebab-case
🔧 Install
· 🧩 Example
· 🚴 Bench
· 📜 API docs
· 🔥 Releases
· 💪🏼 Contribute
· 🖐️ Help
***
## Install
```sh
$ npm i camelcase-to-kebab
```
## Example
```ts
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](#camelcasetokebab)
* [Parameters](#parameters)
### camelCaseToKebab
[src/index.ts:7-18](https://github.com/stagas/camelcase-to-kebab/blob/7c0f6825bfa80b31939dda4d340409d9fd87b315/src/index.ts#L7-L18 "Source code on GitHub")
Converts a string from `camelCase` to `kebab-case`.
#### Parameters
* `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The string in `camelCase` to be converted
Returns **any** The string in `kebab-case`
## See also
* [kebab-to-camel](https://github.com/stagas/kebab-to-camel) - convert kebab-case to camelCase
## Contribute
[Fork](https://github.com/stagas/camelcase-to-kebab/fork) or
[edit](https://github.dev/stagas/camelcase-to-kebab) and submit a PR.
All contributions are welcome!
## License
MIT © 2021
[stagas](https://github.com/stagas)