MCPcopy Create free account
hub / github.com/cameri/nostream / getTemplate

Function getTemplate

src/utils/template-cache.ts:17–28  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

15 * immediately without a restart.
16 */
17export const getTemplate = (path: string): string => {
18 if (isProd) {
19 let template = cache.get(path)
20 if (template === undefined) {
21 template = readFileSync(path, 'utf8')
22 cache.set(path, template)
23 }
24 return template
25 }
26
27 return readFileSync(path, 'utf8')
28}

Callers 6

handleRequestMethod · 0.90
handleRequestMethod · 0.90
rootRequestHandlerFunction · 0.90
getTermsRequestHandlerFunction · 0.90
getPrivacyRequestHandlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected