Buckets:
6.69 GB
45,738 files
Updated about 2 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| .github | 1 items | ||
| example | 1 items | ||
| test | 1 items | ||
| .eslintrc | 437 Bytes xet | aa56f1eb | |
| CHANGELOG.md | 4.1 kB xet | 8c37de02 | |
| LICENSE | 1.07 kB xet | ec036deb | |
| README.md | 1.98 kB xet | f8a4dfcd | |
| index.js | 1.39 kB xet | 6c8b15e2 | |
| package.json | 1.85 kB xet | 34dd9fe4 |
camelize
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
- Total size
- 6.69 GB
- Files
- 45,738
- Last updated
- Sep 12
- Pre-warmed CDN
- US EU US EU
