1.0.10 • Published 6 years ago
san-camel v1.0.10
SanCamel
Module to transform all sorts of values to camel case
USAGE
Installation in package.json
npm i -S san-camelExample 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: testTheStringDudeExample 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 ;)