/ live.thehmm.nl / back / node_modules / camelize /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]example/2 years ago -  
[DIR]test/2 years ago -  
[TXT]CHANGELOG.md40 years ago4.0K 
[   ]LICENSE40 years ago1.0K 
[TXT]README.md40 years ago1.9Kd7c1522 post receive test [كارل مبارك]
[   ]index.js40 years ago1.4K 
[   ]package.json2 years ago2.8K 
README.md

camelize Version Badge

github actions coverage License Downloads

npm badge

recursively transform key strings to camel-case

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

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80