(branch, type)
| 16 | }; |
| 17 | |
| 18 | export 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 | |
| 28 | export const createFunction = (self, name) => { |
| 29 | const cbs = [...worker(name)]; |