dot-snake-camel-case-convertor

convert dot-case, snake_case, camelCase to one another.

Usage no npm install needed!

<script type="module">
  import dotSnakeCamelCaseConvertor from 'https://cdn.skypack.dev/dot-snake-camel-case-convertor';
</script>

README

dot-snake-camel-case-convertor

【WIP】convert dot-case, snake_case, camelCase to one another. eg: hello-world => hello_world / HelloWorld (vice versa)

Install

npm install dot-snake-camel-case-convertor

Usage


// es module
import camel2dot from 'dot-snake-camel-case-convertor'
camel2dot('helloWorld') // hello-world

// commonjs
const camel2dot = require('dot-snake-camel-case-convertor')
camel2dot('helloWorld') // hello-world

Tip

this is still working in progress. only support strict camelCase to dot-case now. eg: helloWorld => hello-world