MCPcopy
hub / github.com/markedjs/marked / fetchMarked

Function fetchMarked

docs/demo/worker.js:113–129  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

111}
112
113function fetchMarked(file) {
114 return () =>
115 fetch(file)
116 .then((res) => res.text())
117 .then((text) => {
118 const g = globalThis || global;
119 g.module = { };
120 try {
121 // eslint-disable-next-line no-new-func
122 Function(text)();
123 } catch {
124 throw new Error(`Cannot find ${file}`);
125 }
126 const marked = g.marked || g.module.exports;
127 return marked;
128 });
129}
130
131function loadVersion(ver) {
132 let promise;

Callers 1

loadVersionFunction · 0.85

Calls 1

textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…