eligius
    Preparing search index...

    Variable formatTextConst

    formatText: TOperation<
        IFormatTextOperationData,
        Omit<IFormatTextOperationData, "transformation">,
    > = ...

    Transforms text using format operations: uppercase, lowercase, capitalize, titlecase, or trim.

    Operates on textContent passed from previous operations (e.g., getTextContent).

    Transformations:

    • uppercase: Convert all characters to uppercase
    • lowercase: Convert all characters to lowercase
    • capitalize: Capitalize only the first letter
    • titlecase: Capitalize first letter of each word
    • trim: Remove leading and trailing whitespace

    Operation data with formattedText containing the transformed text

    // Convert to uppercase
    const result = formatText({
    textContent: 'hello',
    transformation: 'uppercase'
    });
    // result.formattedText = "HELLO"
    // Title case
    const result = formatText({
    textContent: 'hello world',
    transformation: 'titlecase'
    });
    // result.formattedText = "Hello World"