Convert input (string, array, object) to lowerCamelcase
npm install camelcase-inputlowerCamelcase Format







> Convert your input into lowerCamelcase format, this Node.js module allows you to convert string, array. object into lowerCamelcase.
Install with the node package manager npm:
- Using npm
``shell`
$ npm install camelcase-input --save
`
- Using yarn
shell`
$ yarn add camelcase-input
`javascript
const camelcase = require('camelcase-input').camelcase
console.log(camelcase('Foo-Bar'))
/ OUTPUT /
fooBar
`
`javascript
const camelcase = require('camelcase-input').camelcase
console.log(camelcase({'foo-bar': true}))
/ OUTPUT /
{ fooBar: true }
`
`javascript
const camelcase = require('camelcase-input').camelcase
console.log(camelcase([{'foo-bar': true}, {'is_that_you': true}]))
/ OUTPUT /
[ { fooBar: true }, { isThatYou: true } ]
`
`javascript
const camelcase = require('camelcase-input').camelcase
console.log(camelcase(['Foo-Bar', 'are-you-there']))
/ OUTPUT /
fooBar, areYouThere
`
`javascript
const camelcase = require('camelcase-input').camelcase
console.log(camelcase([{'FOo-bar': [{'abc-df__r': true}, {'tghd_dfdf--ee': true}]}, {'bar-foo': { 'Test-te': {'opt-tdt': 'dfdfdf'} }}], { deep: true })))
/ OUTPUT /
[{ fooBar: [{ abcDfR: true }, { tghdDfdfEe: true }] },{ barFoo: { testTe: { optTdt: dfdfdf } } }]
``
- _1.0.0 Initial version_
- _1.0.1 email regex added (email is not converted)_
- _1.0.5 some issues resolved_