1.0.6 • Published 7 years ago

babel-camelize v1.0.6

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

Build Status

Overview :

It replaces 2 characters (the first is ., - or __ ) to ONE letter which is the second letter but CAPITAL.

Examples

   "entity_name" => "entityName"
   "entity.name" => "entityName"
   "entity-name" => "entityName"    
   {first_name:"Abdou", last_name:"TM"} => {firstName: "Abdou", lastName:"TM"}  

It is compatible with Babel projects (ES7, React.JS,...)

Example :

import Camelize, {CamelCase} from 'babel-camelize';
//----then---
CamelCase("first_name") //  "firstName"
Camelize({first_name:"A", last_name:"T"}) // {firstName: "A", lastName:"T"}

Inspiration:

This package has been implemented & inspiring from @camelize package.

License :

MIT