botbook/node_modules/json-schema-library/dist/lib/utils/render.d.ts
Rodrigo Rodriguez 6ae15fe3e5 Updated.
2024-09-04 13:13:15 -03:00

11 lines
453 B
TypeScript

/**
* Renders data into a string by {{variables}}.
* Given a template string, removes all {{property}} substrings and replaces them with the property in the given data
*
* @param template - template string containing variables in handelbars/mustache style
* @param data - flat object containing properties matching variables
* @return rendered string
*/
export default function render(template: string, data?: {
[p: string]: any;
}): string;