camelcasify
v1.0.1
Published
Convert object to camel case.
Downloads
11,296
Maintainers
Readme
camelcasify
Convert an object to camel case
Usage
const camelcasify = require('camelcasify');
const src = {
content_id: 123,
parent_content: {
nested_attr: {
nested_nested_attr: [
{
content_id: 1
},
{
content_types: ['movie', 'episode']
}
]
}
}
};
console.log(camelcasify(src));
// output
/**
{
contentId: 123,
parentContent: {
nestedAttr: {
nestedNestedAttr: [
{
contentId: 1
},
{
contentTypes: ['movie', 'episode']
}
]
}
}
};
**/