@n1k1t/unit-generator
Version:
Coverage based unit tests AI generator
18 lines • 768 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const json2md_1 = require("json2md");
json2md_1.converters.plain = (input) => input;
json2md_1.converters.file = (input) => {
const tags = [];
if (input.title) {
tags.push(`<title>${input.title}</title>`);
}
if (input.path) {
tags.push(`<path>${input.path}</path>`);
}
return tags.concat([`<content>\n${input.content}\n</content>`]).join('\n');
};
json2md_1.converters.ol = (input) => input.map((line, index) => `${index + 1}. ${line}`).join('\n');
json2md_1.converters.ul = (input) => input.map((line) => `- ${line}`).join('\n');
json2md_1.converters.p = (input) => Array.isArray(input) ? input.join('\n\n') : input;
//# sourceMappingURL=setup.js.map