An abstract class that helps with the application of templates in strings. Wrap the template in curly braces inside the string you want to apply the template to.

Hierarchy

  • Templater

Constructors

Properties

Methods

Constructors

Properties

keys: string[]

The keys handled by this templater. They don't include the curly braces.

Memberof

Templater

Methods

  • Apply the template.

    Parameters

    • str: string

      The string to process.

    Returns string

    The string with the templates replaced.

  • Get the actual value that will replace the key inside the template.

    Parameters

    • key: string

      The key to replace.

    Returns string

    The corresponding string for the given key.

    Throws

    Throws if given key does not correspond to this templater.

Generated using TypeDoc