API reference@evolu/commonType › uppercase

function uppercase<S>(value: S): Uppercase<S>;

Defined in: packages/common/src/Type.ts:6405

Uppercases the whole string and returns a UppercasedString.

Leaves an empty string unchanged. Uses JavaScript's default Unicode casing without locale-specific rules. Changing case can change the length, so input brands are not retained.

Example

import { assertEqual, assertType, uppercase } from "@evolu/common";

const text = uppercase("Hello world");
assertEqual(text, "HELLO WORLD");
assertType<typeof text, "HELLO WORLD">();
assertEqual(uppercase(text), text);