• Effectively creates a template literal out of an existing template string and wraps it in a function which can be called multiple times to 'render' the template with the given arguments.

    Parameters

    • templateStr: string

      the template string

    • Optional argNames: string[]

      tThe names of the parameters of the returned function (which can be 'seen' inside the template string)

    Returns ((...any) => string)

      • (...any): string
      • Parameters

        • Rest ...any: any

        Returns string

    Example

    const t = await apriori.template('I will render this ${"guy"} immediately!!!')();
    // t === 'I will render this guy immediately!!!'