MCPcopy Index your code
hub / github.com/prettydiff/prettydiff / buildDocumentation

Function buildDocumentation

services.ts:1063–1107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1061 data = [data.slice(0, start), ops.injectFlag + "\n", data.slice(end)].join("");
1062 },
1063 buildDocumentation = function node_apps_build_libraries_modifyFile_read_buildDocumentation():string {
1064 const allOptions:string[] = [];
1065 let a:number = 0,
1066 b:number = 0,
1067 vals:string[],
1068 vallen:number,
1069 item:string[],
1070 optName:string,
1071 opt:option;
1072 do {
1073 optName = optkeys[a];
1074 opt = prettydiff.api.optionDef[optName];
1075 item = [`<li id="${optName}">`];
1076 item.push(`<h4>${optName}</h4>`);
1077 item.push(`<ul><li><h5>Description</h5>`);
1078 item.push(opt.definition);
1079 item.push(`</li><li><h5>Environment</h5>`);
1080 item.push(opt.api);
1081 item.push(`</li><li><h5>Type</h5>`);
1082 item.push(opt.type);
1083 item.push(`</li><li><h5>Mode</h5>`);
1084 item.push(opt.mode);
1085 item.push(`</li><li><h5>Lexer</h5>`);
1086 item.push(opt.lexer);
1087 if (opt.values !== undefined) {
1088 b = 0;
1089 vals = Object.keys(opt.values);
1090 vallen = vals.length;
1091 item.push(`</li><li><h5>Accepted Values</h5><dl>`);
1092 do {
1093 item.push(`<dt>${vals[b]}</dt><dd>${opt.values[vals[b]]}</dd>`);
1094 b = b + 1;
1095 } while (b < vallen);
1096 item.push(`</dl>`);
1097 }
1098 item.push(`</li><li><h5>Default</h5>`);
1099 item.push(String(opt.default));
1100 item.push(`</li><li><h5>As labeled in the HTML tool</h5>`);
1101 item.push(opt.label);
1102 item.push(`</li></ul></li>`);
1103 allOptions.push(item.join(""));
1104 a = a + 1;
1105 } while (a < keyslen);
1106 return allOptions.join("");
1107 },
1108 buildDomInterface = function node_apps_build_libraries_modifyFile_read_buildDomInterface():string {
1109 const allItems:string[] = [],
1110 exclusions = {

Callers 1

modifyFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected