Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/stagas/kebab-to-camel

convert kebab-case to camelCase
https://github.com/stagas/kebab-to-camel

camel-case camelcase kebab-case kebabcase string string-format string-manipulation

Last synced: 14 days ago
JSON representation

convert kebab-case to camelCase

Awesome Lists containing this project

README

        

kebab-to-camel


convert kebab-case to camelCase


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

***

## Install

```sh
$ npm i kebab-to-camel
```

## Example

```ts
import { kebabToCamel } from 'kebab-to-camel'

console.log(kebabToCamel('hello-camel-world'))
// => helloCamelWorld
```

## Bench

`kebab-to-camel` 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-camel:

## API

#### Table of Contents

* [kebabToCamel](#kebabtocamel)
* [Parameters](#parameters)

### kebabToCamel

[src/index.ts:7-18](https://github.com/stagas/kebab-to-camel/blob/f08cfc7439b855c53969980b72ab3c838433d679/src/index.ts#L7-L18 "Source code on GitHub")

Converts a string from `kebab-case` to `camelCase`.

#### Parameters

* `input` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The string in `kebab-case` to be converted

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The string in `camelCase`

## Contribute

[Fork](https://github.com/stagas/kebab-to-camel/fork) or
[edit](https://github.dev/stagas/kebab-to-camel) and submit a PR.

All contributions are welcome!

## License

MIT © 2021
[stagas](https://github.com/stagas)