@technobuddha > library > String > Operations
Function: fillTemplate()
ts
function fillTemplate(
input: string,
values: Record<string, string | undefined>,
options: FillTemplateOptions): string;Defined in: fill-template.ts:25
Fill a template with supplied values
Parameters
| Parameter | Type | Description |
|---|---|---|
input | string | The template |
values | Record<string, string | undefined> | A dictionary of name-values used to fill in values in the template |
options | FillTemplateOptions | see FillTemplateOptions |
Returns
string
template with values replaced
Default Value
ts
open '{{'Default Value
ts
close '}}'