1 | # Pascal Case
|
2 |
|
3 | > Transform into a string of capitalized words without separators.
|
4 |
|
5 | ## Installation
|
6 |
|
7 | ```
|
8 | npm install pascal-case --save
|
9 | ```
|
10 |
|
11 | ## Usage
|
12 |
|
13 | ```js
|
14 | import { pascalCase } from "pascal-case";
|
15 |
|
16 | pascalCase("string"); //=> "String"
|
17 | pascalCase("dot.case"); //=> "DotCase"
|
18 | pascalCase("PascalCase"); //=> "PascalCase"
|
19 | pascalCase("version 1.2.10"); //=> "Version_1_2_10"
|
20 | ```
|
21 |
|
22 | The function also accepts [`options`](https://github.com/blakeembrey/change-case#options).
|
23 |
|
24 | ### Merge Numbers
|
25 |
|
26 | If you'd like to remove the behavior prefixing `_` before numbers, you can use `pascalCaseTransformMerge`:
|
27 |
|
28 | ```js
|
29 | import { pascalCaseTransformMerge } from "pascal-case";
|
30 |
|
31 | pascalCase("version 12", { transform: pascalCaseTransformMerge }); //=> "Version12"
|
32 | ```
|
33 |
|
34 | ## License
|
35 |
|
36 | MIT
|