text-sentence-case

Convert into a lower case with spaces between words, then capitalize text

Usage no npm install needed!

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

README

Sentence Case

NPM version NPM downloads Bundle size

Transform into a lower case with spaces between words, then capitalize text

Installation

npm install text-sentence-case --save

Usage

import { sentenceCase } from "text-sentence-case";

sentenceCase("string"); //=> "String"
sentenceCase("dot.case"); //=> "Dot case"
sentenceCase("PascalCase"); //=> "Pascal case"
sentenceCase("camelCase"); //=> "Camel case"
sentenceCase("version 1.2.3"); //=> "Version 1 2 3"

The function also accepts options.

License

MIT