API reference › @evolu/common › Type › lowercase
function lowercase<S>(value: S): Lowercase<S>;
Defined in: packages/common/src/Type.ts:6513
Lowercases the whole string and returns a LowercasedString.
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, lowercase } from "@evolu/common";
const text = lowercase("Hello WORLD");
assertEqual(text, "hello world");
assertType<typeof text, "hello world">();
assertEqual(lowercase(text), text);