An open API service indexing awesome lists of open source software.

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

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)