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

Function render

esm/index.js:29–40  ·  view source on GitHub ↗
(where, what)

Source from the content-addressed store, hash-verified

27
28const cache = umap(new WeakMap);
29export const render = (where, what) => {
30 const hook = typeof what === 'function' ? what() : what;
31 const info = cache.get(where) || cache.set(where, createCache(null));
32 info.w = where;
33 info.W = what;
34 return $render(
35 where,
36 hook instanceof Hook ?
37 unroll(info, hook) :
38 (unrollHole(info, hook), hook)
39 );
40};
41
42export {
43 contextual,

Callers 4

createHookFunction · 0.70
render$1Function · 0.50
demoFunction · 0.50
render$1Function · 0.50

Calls 3

createCacheFunction · 0.70
unrollFunction · 0.70
unrollHoleFunction · 0.70

Tested by

no test coverage detected