Optional
autoWhen enabled, objects and arrays are automatically converted to JSON strings. This is useful when you want to display complex data structures in the template.
Optional
maxMaximum depth for nested variable resolution. This prevents circular references and infinite loops in complex data structures.
Optional
parseWhen enabled, attempts to parse string values as BigInt. This is useful when working with large numbers that exceed JavaScript's Number.MAX_SAFE_INTEGER.
Optional
parseWhen enabled, attempts to parse string values as JSON. This is useful when you want to convert string representations of objects back to objects.
Optional
preserveControls how undefined variables are handled in the output. When false, undefined variables are replaced with an empty string. When true, the original variable placeholder is preserved.
Optional
resolverCustom function to resolve variable values. This allows for custom logic when resolving template variables.
The variable path being resolved (e.g., "user.profile.name")
The resolved value or undefined if the variable should be handled by the default resolver
Optional
strictWhen enabled, throws an error if a variable referenced in the template is not found. This is useful for catching missing variables early in development.
Optional
stringTransform function applied to the final string output. This allows for custom string processing after all variables are resolved.
The processed string value
The transformed string
Optional
variableCustom regular expression pattern for matching variables in the template. The pattern should have a capture group for the variable name.
Configuration options for template compilation. These options control how templates are processed and how variables are resolved.