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

Function createHook

esm/index.js:63–81  ·  view source on GitHub ↗
(info, entry)

Source from the content-addressed store, hash-verified

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

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