Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/stagas/kebab-to-camel
- Owner: stagas
- Created: 2021-11-05T14:43:33.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-22T13:23:17.000Z (almost 3 years ago)
- Last Synced: 2024-09-18T00:50:27.596Z (about 2 months ago)
- Topics: camel-case, camelcase, kebab-case, kebabcase, string, string-format, string-manipulation
- Language: JavaScript
- Homepage:
- Size: 475 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)