Skip to content

pascalCase

String.pascalCase(target)

Converts target string to PascalCase format.

Example

ts
import { String } from "@monstermann/string";

String.pascalCase("hello world"); // "HelloWorld"
String.pascalCase("hello-world"); // "HelloWorld"
ts
import { String } from "@monstermann/string";

pipe("hello world", String.pascalCase()); // "HelloWorld"
pipe("hello-world", String.pascalCase()); // "HelloWorld"