The type of the template input which is also the output type
The template to compile. Can be a string, object, or array.
Object containing variable values for template resolution
Configuration options for template compilation
The compiled template with variables resolved
// Basic string interpolation
compileTemplate("Hello {{name}}", { name: "World" });
// Output: "Hello World"
// Nested object access
compileTemplate("Hello {{user.profile.name}}", {
user: {
profile: {
name: "John"
}
}
});
// Output: "Hello John"
Compiles templates with advanced features for variable resolution and processing.
This function processes templates by replacing variables with their corresponding values from the provided variables object. It supports deep variable resolution, object processing, and various configuration options for customization.
Key Features: