MCPcopy Create free account
hub / github.com/breck7/scroll / formatStr

Method formatStr

external/.scrollLibs.js:14394–14400  ·  view source on GitHub ↗
(str, catchAllAtomDelimiter = " ", parameterMap)

Source from the content-addressed store, hash-verified

14392 return window[name]
14393 }
14394 static formatStr(str, catchAllAtomDelimiter = " ", parameterMap) {
14395 return str.replace(/{([^\}]+)}/g, (match, path) => {
14396 const val = parameterMap[path]
14397 if (val === undefined) return ""
14398 return Array.isArray(val) ? val.join(catchAllAtomDelimiter) : val
14399 })
14400 }
14401 static stripHtml(text) {
14402 return text && text.replace ? text.replace(/<(?:.|\n)*?>/gm, "") : text
14403 }

Callers 1

_getCompiledLineMethod · 0.80

Calls 2

replaceMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected