string-casing

Utilities to change string casing.

Usage no npm install needed!

<script type="module">
  import stringCasing from 'https://cdn.skypack.dev/string-casing';
</script>

README

String casing

Utility functions for dealing with common string casing needs.

Installation

npm install --save string-casing

API

camelCase(str)

param: {string} str - A string that is currently snake cased (e.g. hello_world).

returns {string} - A camel cased string (e.g. helloWorld).

snakeCase(str)

param: {string} str - A string that is currently camel cased (e.g. helloWorld).

returns {string} - A snake cased string (e.g. hello_world).