1 | # Header Case
|
2 |
|
3 | [![NPM version][npm-image]][npm-url]
|
4 | [![NPM downloads][downloads-image]][downloads-url]
|
5 | [![Bundle size][bundlephobia-image]][bundlephobia-url]
|
6 |
|
7 | > Transform into a dash separated string of capitalized words.
|
8 |
|
9 | ## Installation
|
10 |
|
11 | ```
|
12 | npm install header-case --save
|
13 | ```
|
14 |
|
15 | ## Usage
|
16 |
|
17 | ```js
|
18 | import { headerCase } from "header-case";
|
19 |
|
20 | headerCase("string"); //=> "String"
|
21 | headerCase("dot.case"); //=> "Dot-Case"
|
22 | headerCase("PascalCase"); //=> "Pascal-Case"
|
23 | headerCase("version 1.2.10"); //=> "Version-1-2-10"
|
24 | ```
|
25 |
|
26 | The function also accepts [`options`](https://github.com/blakeembrey/change-case#options).
|
27 |
|
28 | ## License
|
29 |
|
30 | MIT
|
31 |
|
32 | [npm-image]: https://img.shields.io/npm/v/header-case.svg?style=flat
|
33 | [npm-url]: https://npmjs.org/package/header-case
|
34 | [downloads-image]: https://img.shields.io/npm/dm/header-case.svg?style=flat
|
35 | [downloads-url]: https://npmjs.org/package/header-case
|
36 | [bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/header-case.svg
|
37 | [bundlephobia-url]: https://bundlephobia.com/result?p=header-case
|