• Parse a text to replace placeholders with values.

    Parameters

    • text: string

      the text to parse

    Returns string

    the parsed text

    parseText("Hello, {name}!");
    // => "Hello, name!"
    // With arguments inside the placeholders
    parseText("The year is {date:YYYY");
    // => "The year is 2024"

    0.4.0