Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function processText (dialogNode, context, wrap = true) {
let text = utils.i18n(dialogNode, 'text')
text = tmpl(text || '', context)
if (!text) {
return undefined
}
if (wrap) {
return wrapText(`<div>${text}</div>`)
}
return text
}