MCPcopy
hub / github.com/webpro/reveal-md / renderFile

Function renderFile

lib/render.js:83–90  ·  view source on GitHub ↗
(filePath, extraOptions)

Source from the content-addressed store, hash-verified

81};
82
83export const renderFile = async (filePath, extraOptions) => {
84 try {
85 const content = await readFile(filePath);
86 return render(content.toString(), extraOptions);
87 } catch (e) {
88 return render('File not found.', extraOptions);
89 }
90};
91
92export default async (req, res) => {
93 const dir = await getInitialDir();

Callers 2

copyAssetsAndWriteFileFunction · 0.90
render.jsFile · 0.85

Calls 1

renderFunction · 0.85

Tested by

no test coverage detected