Function mix

  • Composes formatters.

    Remarks

    Given an array of formatters, it will return a new formatter that will apply all of them to the input string.

    Example

    const redTextWhiteBackground = mix(foregroundRed, backgroundWhite);

    redTextWhiteBackground("Vangware");
    // It can also be used as a tag function for tagged templates:
    redTextWhiteBackground`Vangware`;

    See

    Formatter

    Parameters

    • Rest ...formatters: ReadOnlyArray<Formatter>

      Array of formatters to be composed.

    Returns Formatter

    Formatter composed of the given formatters.