Skip to content

zhiyelee/camelCasify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

camelcasify

Build Status

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']
          }
        ]
      }
    }
   };
**/

LICENCE

MIT

Releases

No releases published

Packages

No packages published