camelcasify

1.0.1 • Public • Published

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

/camelcasify/

    Package Sidebar

    Install

    npm i camelcasify

    Weekly Downloads

    467

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • zhiyelee