@neutrium/formatter - v1.0.1
    Preparing search index...

    Function renderTokens

    • Joins token values into their final presentation string. Preserves every fragment, including whitespace and bidirectional marks. Use this for a plain-text version of parts you already have, such as an email summary of a styled price. For text alone, use formatter.format(); detailed results already include their text as result.text.

      Parameters

      • tokens: readonly FormatToken[]

        Ordered scalar or range tokens to render.

      Returns string

      Concatenated token values; an empty array produces an empty string.

      import { formatter, renderTokens } from "@neutrium/formatter";

      const parts = formatter.formatToParts(1234.5, { kind: "currency", currency: "USD" });
      // The UI renders these parts as styled elements. The receipt needs plain text:
      const receiptLine = `Total: ${renderTokens(parts)}`;
      // "Total: $1,234.50"