1.0.10 • Published 4 years ago

san-camel v1.0.10

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

SanCamel

Module to transform all sorts of values to camel case

USAGE

Installation in package.json

npm i -S san-camel

Example with Objects

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

import {SanToCamelCase} from "san-camel/dist";

const testObject = "test-the-string-dude";
const formattedValue = SanToCamelCase(testObject);

// output: testTheStringDude

Example with Arrays of objects

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 ;)
1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago