MCPcopy Create free account
hub / github.com/Bytez-com/docs / formatIntoCodeSnippet

Function formatIntoCodeSnippet

docs/scripts/generatePages/index.js:321–327  ·  view source on GitHub ↗
(template, params, stream, onBeforeUpdateTemplateIds, replacements)

Source from the content-addressed store, hash-verified

319}
320
321function formatIntoCodeSnippet(template, params, stream, onBeforeUpdateTemplateIds, replacements) {
322 const sectionsAsString = formatIntoSections(template, params, stream);
323 const adjustedString = onBeforeUpdateTemplateIds(sectionsAsString);
324 const finalString = updateTemplateIds(adjustedString, replacements);
325
326 return finalString;
327}
328
329function formatIntoSections(templateString, params, stream) {
330 const lines = templateString.split('\n');

Callers 1

generateCodeSnippetsFunction · 0.85

Calls 2

formatIntoSectionsFunction · 0.85
updateTemplateIdsFunction · 0.85

Tested by

no test coverage detected