camelize-minimist
recursively transform key strings to camel-case
fork of the original substack/camelize to better operate with the results of minimist & subarg: leaves "_" alone.
example
var camelize = ;var obj ='fee-fie-foe': 'fum'beep_boop:_: "zip-zap"'abc.xyz': 'mno''foo_bar': 'baz';var res = ;console;
output:
{
"feeFieFoe": "fum",
"beepBoop": {
"_": [
"zip-zap"
],
"abcXyz": "mno",
"fooBar": "baz"
}
}
methods
var 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