How to use the tmpl function in tmpl

To help you get started, we’ve selected a few tmpl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codecombat / codecombat / ozaria / engine / cinematic / dialogsystem / helper.js View on Github external
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
}

tmpl

JavaScript micro templates.

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

65 / 100
Full package analysis