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

Function code

core/src/hooks.js:10–16  ·  view source on GitHub ↗
(hooks, branch, key, lib)

Source from the content-addressed store, hash-verified

8export const worker = (name) => hooks.worker[name];
9
10const code = (hooks, branch, key, lib) => {
11 hooks[key] = () => {
12 const arr = lib ? [lib] : [];
13 arr.push(...branch(key));
14 return arr.map(dedent).join("\n");
15 };
16};
17
18export const codeFor = (branch, type) => {
19 const pylib = type === "mpy" ? stdlib.replace(optional, "") : stdlib;

Callers 1

codeForFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected