1.0.5 • Published 6 years ago

kamelcaser v1.0.5

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

kamelcaser

Build Status Coverage Status Maintainability

Convert strings and object keys to camelCase format.

how to install

$ npm install --save kamelcaser

how to use it

import KamelCaser from "kamelcaser"
// or var KamelCaser = require("kamelcaser")


KamelCaser.string("dashed-string")
// dashedString

KamelCaser.string("snake_string")
// snakeString

KamelCaser.string("PascalString")
// pascalString

KamelCaser.keys({ first_key: 42, SecondKey: 43, "third-key": 44 })
// { firstKey: 42, secondKey: 43, thirdKey: 44 }

// object with deep keys
KamelCaser.keys({ first_key: 42, SecondKey: 43, "third-key": 44, fourthKey: { "fifth_key": 45 } })
// { firstKey: 42, secondKey: 43, thirdKey: 44, fourthKey: { fifthKey: 45 } }

// array of objects
KamelCaser.keys([{ first_key: 42 }, { SecondKey: 43 }, { "third-key": 44 }])
// [{ firstKey: 42 }, { secondKey: 43 }, { thirdKey: 44 }]
1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago