@cagataysert/nameconverter
v5.0.0
Published
Convert snake_case variables to camelCase or reverse.
Downloads
3
Readme
Name Converter
Name converter is a basic tool which is useful to change format of variable names.
Installation
Use the package manager npm to install Name Converter.
npm install nameconverter
Usage
import Converter from "converter";
converter.toSnake('fooBar') # returns 'foo_bar'
converter.toSnake('foo-bar') # returns 'foo_bar'
converter.toCamel('foo_bar') # returns 'fooBar'
converter.toCamel('foo-bar') # returns 'fooBar'
converter.toCapital('foo_bar') # returns 'Foobar'
converter.toCapital('foo-bar') # returns 'Foobar'
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Also you contact with me from my twitter account.
ps: It's my first npm package, be kind please :)
License
MIT