nl_tokens: Gets the rendered output of a template
pl_tokens: function getRenderedTemplate ( template , data , variableRegex ) { return template . replace ( variableRegex , ( match , captured ) => { const replacement = valueForProperty ( <mask> , captured . trim ( ) ) ; // If a template variable is found but nothing is supplied to fill it, remove it if ( replacement == null ) { return '' ; } // If the replacement is a function, replace the variable with the result of the function if ( typeof replacement === 'function' ) { return replacement ( ) ; } // otherwise replace the template variable with the associated data return replacement ; } ) ; }