UNPKG

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