@cagataysert/nameconverter

Convert snake_case variables to camelCase or reverse.

Usage no npm install needed!

<script type="module">
  import cagataysertNameconverter from 'https://cdn.skypack.dev/@cagataysert/nameconverter';
</script>

README

Name Converter Twitter

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