• Create a template engine with handlebars.

    Parameters

    • template: string

      The template string.

    • Optional options: {
          missingDataBehavior?: "throw" | "ignore";
      }

      The options to build the content.

      • Optional missingDataBehavior?: "throw" | "ignore"

    Returns HandlebarsTemplateDelegate

    The built content.

    Description

    This function returns a function which can build content by given data. Usage:

    const template = 'Hello, {{name}}!';
    const templateEngine = createTemplateEngine(template);
    const data = { name: 'World' };
    const content = templateEngine(data);
    // content = 'Hello, World!'

    For the details of how the engine works,

    See

    buildContentFromTemplateString

    Description

    Link

    https://handlebarsjs.com/

Generated using TypeDoc