MCPcopy Create free account
hub / github.com/Borrus-sudo/tinypages / compile

Function compile

packages/vite/src/node/plugins/dev/markdown-dev.ts:32–45  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

30 * The compile function takes something as input and caches it.
31 */
32 const compile = async (input: string): Promise<[string, Meta]> => {
33 const digest = hash(input).toString();
34 if (cache.has(digest)) {
35 return JSON.parse(cache.get(digest));
36 }
37 const result = await compileMarkdown(
38 input,
39 config.compiler,
40 utils.markdown_cache,
41 false
42 );
43 cache.set(digest, JSON.stringify(result));
44 return result;
45 };
46
47 return {
48 name: "vite-tinypages-markdown",

Callers

nothing calls this directly

Calls 4

hasMethod · 0.80
getMethod · 0.80
setMethod · 0.80
hashFunction · 0.50

Tested by

no test coverage detected