MCPcopy Index your code
hub / github.com/pyscript/pyscript / codeFor

Function codeFor

core/src/hooks.js:18–26  ·  view source on GitHub ↗
(branch, type)

Source from the content-addressed store, hash-verified

16};
17
18export const codeFor = (branch, type) => {
19 const pylib = type === "mpy" ? stdlib.replace(optional, "") : stdlib;
20 const hooks = {};
21 code(hooks, branch, `codeBeforeRun`, pylib);
22 code(hooks, branch, `codeBeforeRunAsync`, pylib);
23 code(hooks, branch, `codeAfterRun`);
24 code(hooks, branch, `codeAfterRunAsync`);
25 return hooks;
26};
27
28export const createFunction = (self, name) => {
29 const cbs = [...worker(name)];

Callers 1

core.jsFile · 0.90

Calls 1

codeFunction · 0.85

Tested by

no test coverage detected