MCPcopy Create free account
hub / github.com/WebReflection/neverland / createHook

Function createHook

cjs/index.js:69–87  ·  view source on GitHub ↗
(info, entry)

Source from the content-addressed store, hash-verified

67};
68
69const createHook = (info, entry) => augmentor(function () {
70 const hole = entry.fn.apply(null, arguments);
71 if (hole instanceof Hole) {
72 unrollHole(info, hole);
73 updateEntry(entry, view(entry, hole));
74 }
75 else
76 updateEntry(entry, hole);
77 try { return entry.node; }
78 finally {
79 if (update) {
80 update = false;
81 let p = info;
82 while (p.p)
83 p = p.p;
84 render(p.w, p.W);
85 }
86 }
87});
88
89const createCache = p => ({p, stack: [], entry: null});
90

Callers 1

unrollFunction · 0.70

Calls 5

unrollHoleFunction · 0.70
updateEntryFunction · 0.70
viewFunction · 0.70
renderFunction · 0.70
augmentorFunction · 0.50

Tested by

no test coverage detected