text-header-case

Convert into a dash separated text of capitalized words

Usage no npm install needed!

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

README

Header Case

NPM version NPM downloads Bundle size

Transform into a dash separated text of capitalized words

Installation

npm install text-header-case --save

Usage

import { headerCase } from "text-header-case";

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

The function also accepts options.

License

MIT