MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / template

Function template

lib/utils.js:108–114  ·  view source on GitHub ↗
(template, data)

Source from the content-addressed store, hash-verified

106}
107
108export const template = function (template, data) {
109 return template.replace(/{{([^{}]*)}}/g, (a, b) => {
110 const r = data[b]
111 if (r === undefined) return ''
112 return r.toString()
113 })
114}
115
116/**
117 * Make first char uppercase.

Callers 6

persistFunction · 0.90
writeIndexFunction · 0.90
getExceptionMethod · 0.90
getExceptionMethod · 0.90
getExceptionMethod · 0.90
getExceptionMethod · 0.90

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected