Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
recursively transform key strings to camel-case
branch: master

1.0.0

latest commit 20a1485c7e
James Halliday authored
Failed to load latest commit information.
example docs
test add support for dates and regex
.travis.yml using travis
LICENSE package.json etc
index.js add support for dates and regex
package.json 1.0.0
readme.markdown badges

readme.markdown

camelize

recursively transform key strings to camel-case

build status

browser support

example

var camelize = require('camelize');
var obj = {
    fee_fie_foe: 'fum',
    beep_boop: [
        { 'abc.xyz': 'mno' },
        { 'foo-bar': 'baz' }
    ]
};
var res = camelize(obj);
console.log(JSON.stringify(res, null, 2));

output:

{
  "feeFieFoe": "fum",
  "beepBoop": [
    {
      "abcXyz": "mno"
    },
    {
      "fooBar": "baz"
    }
  ]
}

methods

var camelize = require('camelize')

camelize(obj)

Convert the key strings in obj to camel-case recursively.

install

With npm do:

npm install camelize

To use in the browser, use browserify.

license

MIT

Something went wrong with that request. Please try again.