MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / fillTemplate

Function fillTemplate

src/settings/lspServerDetail.js:65–70  ·  view source on GitHub ↗
(template, replacements)

Source from the content-addressed store, hash-verified

63}
64
65function fillTemplate(template, replacements) {
66 return Object.entries(replacements).reduce(
67 (result, [key, value]) => result.replaceAll(`{${key}}`, String(value)),
68 String(template || ""),
69 );
70}
71
72function clone(value) {
73 if (!value || typeof value !== "object") return value;

Callers 4

formatInstallStatusFunction · 0.85
formatInstallInfoFunction · 0.85
callbackFunction · 0.85

Calls 1

StringInterface · 0.85

Tested by

no test coverage detected