Skip to content

@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

ParameterTypeDescription
inputstringThe template
valuesRecord<string, string | undefined>A dictionary of name-values used to fill in values in the template
optionsFillTemplateOptionssee FillTemplateOptions

Returns

string

template with values replaced

Default Value

ts
open '{{'

Default Value

ts
close '}}'