Blame view
node_modules/camelize/readme.markdown
957 Bytes
f7563de62
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# camelize recursively transform key strings to camel-case [](http://travis-ci.org/substack/camelize) [](http://ci.testling.com/substack/camelize) # example ``` js 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 ``` js var camelize = require('camelize') ``` ## camelize(obj) Convert the key strings in `obj` to camel-case recursively. # install With [npm](https://npmjs.org) do: ``` npm install camelize ``` To use in the browser, use [browserify](http://browserify.org). # license MIT |