https://github.com/reiosantos/san-to-camel-case
Transforming all to camel case
https://github.com/reiosantos/san-to-camel-case
camelcase javascript typescript
Last synced: 25 days ago
JSON representation
Transforming all to camel case
- Host: GitHub
- URL: https://github.com/reiosantos/san-to-camel-case
- Owner: reiosantos
- Created: 2020-03-04T09:25:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T09:02:28.000Z (over 3 years ago)
- Last Synced: 2025-02-23T03:17:32.220Z (over 1 year ago)
- Topics: camelcase, javascript, typescript
- Language: TypeScript
- Size: 744 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# SanCamel
Module to transform all sorts of values to camel case
# USAGE
## Installation in package.json
```bash
npm i -S san-camel
```
### Example with Objects
```js
import {SanToCamelCase} from "san-camel/dist";
const testObject = { "my-name": "some name", "another-name": "guess it" }
const formattedValue = SanToCamelCase(testObject);
// output: { myName: "someName", anotherName: "guess it" }
```
### Example with Strings
```js
import {SanToCamelCase} from "san-camel/dist";
const testObject = "test-the-string-dude";
const formattedValue = SanToCamelCase(testObject);
// output: testTheStringDude
```
### Example with Arrays of objects
```js
import {SanToCamelCase} from "san-camel/dist";
const testObject = [{"this is bad": "is it", }, {"this dude": "is it working"}];
const formattedValue = SanToCamelCase(testObject);
// output: [ { thisIsBad: 'is it' }, { thisDude: 'is it working' } ]
```
## Remarks
- Thanks to all ;)