Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/froebel/mod.ts>pascal

A strictly typed utility library.
Go to Latest
variable pascal
import { pascal } from "https://deno.land/x/froebel@v0.21.3/mod.ts";

Transforms a variable name to pascal case.

Note: The rules for transforming anything to pascal case are somewhat vague. So use this only for very simple names where the resulting value is absolutely unambiguous. For more examples of how names are transformed, have a look at the test cases.

Examples

Example 1

camel('foo_bar') // 'FooBar'

type

<T extends string>(str: T) => PascalCase<T>