babel-camelize
v1.0.6
Published
Camelize compatible with babel ES7
Downloads
72
Maintainers
Readme
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