snake-case

Transform into a lower case string with underscores between words

Usage no npm install needed!

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

README

Snake Case

NPM version NPM downloads Bundle size

Transform into a lower case string with underscores between words.

Installation

npm install snake-case --save

Usage

import { snakeCase } from "snake-case";

snakeCase("string"); //=> "string"
snakeCase("dot.case"); //=> "dot_case"
snakeCase("PascalCase"); //=> "pascal_case"
snakeCase("version 1.2.10"); //=> "version_1_2_10"

The function also accepts options.

License

MIT