san-camel

1.0.10 • Public • Published

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

Package Sidebar

Install

npm i san-camel

Weekly Downloads

13

Version

1.0.10

License

MIT

Unpacked Size

4.72 kB

Total Files

5

Last publish

Collaborators

  • reiosantos